[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31537] trunk/blender/source/gameengine/ BlenderRoutines/BL_KetsjiEmbedStart.cpp: BGE bug #23213: VBO preference make object with modifiers crash the BGE.

Benoit Bolsee benoit.bolsee at online.be
Mon Aug 23 22:53:03 CEST 2010


Revision: 31537
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31537
Author:   ben2610
Date:     2010-08-23 22:53:02 +0200 (Mon, 23 Aug 2010)

Log Message:
-----------
BGE bug #23213: VBO preference make object with modifiers crash the BGE. Fix by disabling VBO inside the BGE, it brings no advantage anyway.

Modified Paths:
--------------
    trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp

Modified: trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2010-08-23 17:06:22 UTC (rev 31536)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2010-08-23 20:53:02 UTC (rev 31537)
@@ -72,6 +72,7 @@
 	/***/
 #include "DNA_view3d_types.h"
 #include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
 #include "DNA_windowmanager_types.h"
 #include "BKE_global.h"
 #include "BKE_report.h"
@@ -154,6 +155,10 @@
 	
 	bgl::InitExtensions(true);
 
+	// VBO code for derived mesh is not compatible with BGE (couldn't find why), so disable
+	int disableVBO = (U.gameflags & USER_DISABLE_VBO);
+	U.gameflags |= USER_DISABLE_VBO;
+
 	do
 	{
 		View3D *v3d= CTX_wm_view3d(C);
@@ -563,6 +568,9 @@
 	
 	} while (exitrequested == KX_EXIT_REQUEST_RESTART_GAME || exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME);
 	
+	if (!disableVBO)
+		U.gameflags &= ~USER_DISABLE_VBO;
+
 	if (bfd) BLO_blendfiledata_free(bfd);
 
 	BLI_strncpy(G.sce, oldsce, sizeof(G.sce));





More information about the Bf-blender-cvs mailing list