From 86aa4e5c3d7e0b95d9e55bab027f968b42a3eda6 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Tue, 13 Apr 2010 12:51:03 +0000 Subject: 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. --- source/blender/blenlib/BLI_threads.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/BLI_threads.h') 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 */ -- cgit v1.2.3