[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38185] trunk/blender/source/gameengine/ GamePlayer/ghost/GPG_ghost.cpp: The Blenderplayer wasn' t freeing GPU_Textures since according to BLI_threads, GPU_free_image() was never being called from the main thread.
Mitchell Stokes
mogurijin at gmail.com
Thu Jul 7 12:37:47 CEST 2011
Revision: 38185
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38185
Author: moguri
Date: 2011-07-07 10:37:46 +0000 (Thu, 07 Jul 2011)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2011-07-07 09:56:06 UTC (rev 38184)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2011-07-07 10:37:46 UTC (rev 38185)
@@ -64,6 +64,7 @@
#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 @@
::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();
More information about the Bf-blender-cvs
mailing list