Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2005-07-06 04:33:41 +0400
committerMartin Poirier <theeth@yahoo.com>2005-07-06 04:33:41 +0400
commit22a18ecdb85afb88294be2e1891aa4918e9a5c45 (patch)
tree0d3188f4ae21f67fda4e4d1d437fd567d77ed8a6 /source/blender/makesdna/DNA_image_types.h
parentd50b2c0ff80466b52e1aa49428a47a6163040b4e (diff)
3D view orbit option: Around Active
This fixes the active object in place when orbiting the view. Choppy 15fps demo can be seen there: http://www.elysiun.com/~theeth/bf/around_active.html Image Memory Grabage Collection This adds memory handling to the image code. An image is tagged each time it is used. During a collection cycle (frequency of cycles is user defined), if an image is older than a user defined limit, its buffer gets deallocated. This also applies to gl memory buffers. Images that are loading in GL memory needs to go through two time outs before being fully deallocated: the first time out deallocated the gl memorry, the second the buffer in ram. Notes: Image buffer loaded from python gets tagged as permanent upon load. That tag is removed when python stops using the image. I might have missed some tagging spots, especially in the rendering pipeline. Someone with more knowledge about this code should check to be careful. Tagging is done on every access, for rendering, this will probably be a performance hit. A scheme should be developped to only tag when the rendering is completed. Collecting is called in draw_object, most likely not the best place to do it. Safe from undo, since using undo deallocates memory anyway (like when loading a blend file with one currently opened) Userpref DNA changes: I've changed a couple of flagging variables from short to int. Some because they needed more space, others to keep SDNA happy. Info window changes: I've grouped a couple of buttons in aligned blocks and changed the color of mutually exclusive options to make them clearer. Matt didn't do any changes on that in tuhopuu, so hopefully I'm not stepping on anyone's feet with this. Also changed double constants into floats with f in a couple of places (mostly space.c) to make compiler happier.
Diffstat (limited to 'source/blender/makesdna/DNA_image_types.h')
-rw-r--r--source/blender/makesdna/DNA_image_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 256d69456e8..7d35cf8c5f7 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -62,8 +62,10 @@ typedef struct Image {
struct PackedFile * packedfile;
float lastupdate;
+ long lastused;
short animspeed;
short reserved1;
+ int reserved2;
} Image;
/* in Image struct */
@@ -77,6 +79,7 @@ typedef struct Image {
#define IMA_FROMANIM 4
#define IMA_USED 8
#define IMA_REFLECT 16
+#define IMA_NOCOLLECT 32
/* tpageflag */
#define IMA_TILES 1