App_PhysicsServer_SharedMemory_VR: expose max_num_object_capacity and max_shape_capacity_in_bytes (and shared_memory_key)
Default values are: int maxNumObjectCapacity = 128 * 1024; int maxShapeCapacityInBytes = 128 * 1024 * 1024; int shared_memory_key = -1
This commit is contained in:
@@ -28,9 +28,12 @@
|
||||
|
||||
#include "LinearMath/btIDebugDraw.h"
|
||||
int gSharedMemoryKey = -1;
|
||||
int gDebugDrawFlags = 0;
|
||||
bool gDisplayDistortion = false;
|
||||
bool gDisableDesktopGL = false;
|
||||
static int gDebugDrawFlags = 0;
|
||||
static bool gDisplayDistortion = false;
|
||||
static bool gDisableDesktopGL = false;
|
||||
|
||||
static int maxNumObjectCapacity = 128 * 1024;
|
||||
static int maxShapeCapacityInBytes = 128 * 1024 * 1024;
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -477,7 +480,8 @@ bool CMainApplication::BInit()
|
||||
SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG );
|
||||
|
||||
*/
|
||||
m_app = new SimpleOpenGL3App("SimpleOpenGL3App",m_nWindowWidth,m_nWindowHeight,true);
|
||||
|
||||
m_app = new SimpleOpenGL3App("SimpleOpenGL3App",m_nWindowWidth,m_nWindowHeight,true, maxNumObjectCapacity, maxShapeCapacityInBytes);
|
||||
|
||||
|
||||
sGuiPtr = new OpenGLGuiHelper(m_app,false);
|
||||
@@ -2354,7 +2358,10 @@ int main(int argc, char *argv[])
|
||||
b3ChromeUtilsEnableProfiling();
|
||||
}
|
||||
|
||||
|
||||
args.GetCmdLineArgument("max_num_object_capacity", maxNumObjectCapacity);
|
||||
args.GetCmdLineArgument("max_shape_capacity_in_bytes", maxShapeCapacityInBytes);
|
||||
args.GetCmdLineArgument("shared_memory_key", gSharedMemoryKey);
|
||||
|
||||
#ifdef BT_USE_CUSTOM_PROFILER
|
||||
b3SetCustomEnterProfileZoneFunc(dcEnter);
|
||||
b3SetCustomLeaveProfileZoneFunc(dcLeave);
|
||||
|
||||
Reference in New Issue
Block a user