allow to enable/disable VR picking and VR teleport. Disabling VR picking will also disable the rendering of the VR controller frames.

This commit is contained in:
Erwin Coumans
2017-05-15 11:39:39 -07:00
parent a554c250a7
commit 4dea68e43e
5 changed files with 79 additions and 19 deletions

View File

@@ -367,6 +367,47 @@ void MyKeyboardCallback(int key, int state)
prevKeyboardCallback(key,state);
}
#include "../SharedMemory/SharedMemoryPublic.h"
extern bool useShadowMap;
extern int gDebugDrawFlags;
extern bool gEnablePicking;
extern bool gEnableTeleporting;
void VRPhysicsServerVisualizerFlagCallback(int flag, bool enable)
{
if (flag == COV_ENABLE_SHADOWS)
{
useShadowMap = enable;
}
if (flag == COV_ENABLE_GUI)
{
//there is no regular GUI here, but disable the
}
if (flag==COV_ENABLE_VR_TELEPORTING)
{
gEnableTeleporting = enable;
}
if (flag == COV_ENABLE_VR_PICKING)
{
gEnablePicking = enable;
}
if (flag == COV_ENABLE_WIREFRAME)
{
gDebugDrawFlags |= btIDebugDraw::DBG_DrawWireframe;
} else
{
gDebugDrawFlags &= ~btIDebugDraw::DBG_DrawWireframe;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@@ -418,6 +459,7 @@ bool CMainApplication::BInit()
sGuiPtr = new OpenGLGuiHelper(m_app,false);
sGuiPtr->setVisualizerFlagCallback(VRPhysicsServerVisualizerFlagCallback);
sGuiPtr->setVRMode(true);
//sGuiPtr = new DummyGUIHelper;