diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-07 14:37:46 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-07 14:37:46 +0400 |
commit | 4e7417e9fd1c083ede40389537dc642ec6513025 (patch) | |
tree | 24978abb79f87037f98d06dd4515cb1241cdd54b /source/gameengine/GamePlayer | |
parent | ccc56a65707bfac7140450ec339fc8d232a06e82 (diff) |
The Blenderplayer wasn't freeing GPU_Textures since according to BLI_threads, GPU_free_image() was never being called from the main thread. Calling BLI_threadapi_init() when the Blenderplayer starts sets the current thread as the main thread and solves the problem.
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 14048c70516..cbbeb9419d1 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -64,6 +64,7 @@ extern "C" #include "BKE_node.h" #include "BKE_report.h" #include "BKE_library.h" +#include "BLI_threads.h" #include "BLI_blenlib.h" #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -399,7 +400,11 @@ int main(int argc, char** argv) ::DisposeNibReference(nibRef); */ #endif // __APPLE__ - + + // We don't use threads directly in the BGE, but we need to call this so things like + // freeing up GPU_Textures works correctly. + BLI_threadapi_init(); + RNA_init(); init_nodesystem(); |