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();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to