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

This commit is contained in:
Benoit Bolsee 2010-08-23 20:53:02 +00:00
parent 61dd4cd2e2
commit 972c6d86f0

@ -72,6 +72,7 @@ extern "C" {
/***/
#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 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
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 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
} 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));