diff options
author | Joseph Eagar <joeedh@gmail.com> | 2010-04-13 16:51:03 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2010-04-13 16:51:03 +0400 |
commit | 86aa4e5c3d7e0b95d9e55bab027f968b42a3eda6 (patch) | |
tree | 9208dfc29a7f163ea7af988ad663cfc7c78d2ae1 /source/blender/blenlib/BLI_threads.h | |
parent | e50f7986476a2fe5604d78db6dea784384d3e38f (diff) |
prevent images from freeing gpu buffers if not run within the main thread, instead they are queued to be freed the next time GPU_image_free() is run from the main thread.
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index eda0e830736..e3290873dc3 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -40,6 +40,9 @@ struct ListBase; /* Threading API */ +/*this is run once at startup*/ +void BLI_threadapi_init(void); + void BLI_init_threads (struct ListBase *threadbase, void *(*do_thread)(void *), int tot); int BLI_available_threads(struct ListBase *threadbase); int BLI_available_thread_index(struct ListBase *threadbase); @@ -48,6 +51,7 @@ void BLI_remove_thread (struct ListBase *threadbase, void *callerdata); void BLI_remove_thread_index(struct ListBase *threadbase, int index); void BLI_remove_threads(struct ListBase *threadbase); void BLI_end_threads (struct ListBase *threadbase); +int BLI_thread_is_main(void); /* System Information */ |