allow to enable/disable GUI, shadows, wireframe of OpenGL Visualizer from API

(pybullet.configureDebugVisualizer)
This commit is contained in:
Erwin Coumans
2017-02-21 17:36:54 -08:00
parent 5c74b0a199
commit 37890e5a4d
14 changed files with 183 additions and 7 deletions

View File

@@ -374,6 +374,30 @@ void OpenGLGuiHelper::setUpAxis(int axis)
}
extern bool useShadowMap;
extern bool visualWireframe;
extern bool renderGui;
#include "../SharedMemory/SharedMemoryPublic.h"
void OpenGLGuiHelper::setVisualizerFlag(int flag, int enable)
{
//temporary direct access
if (flag == COV_ENABLE_SHADOWS)
{
useShadowMap = enable;
}
if (flag == COV_ENABLE_GUI)
{
renderGui = enable;
}
if (flag == COV_ENABLE_WIREFRAME)
{
visualWireframe = enable;
}
}
void OpenGLGuiHelper::resetCamera(float camDist, float pitch, float yaw, float camPosX,float camPosY, float camPosZ)
{
if (getRenderInterface() && getRenderInterface()->getActiveCamera())