diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index b5b9c96a7ff..01a9e621304 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -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));