allow to enable/disable GUI, shadows, wireframe of OpenGL Visualizer from API
(pybullet.configureDebugVisualizer)
This commit is contained in:
@@ -125,10 +125,10 @@ bool sUseOpenGL2 = false;
|
||||
extern bool useShadowMap;
|
||||
#endif
|
||||
|
||||
static bool visualWireframe=false;
|
||||
bool visualWireframe=false;
|
||||
static bool renderVisualGeometry=true;
|
||||
static bool renderGrid = true;
|
||||
static bool renderGui = true;
|
||||
bool renderGui = true;
|
||||
static bool enable_experimental_opencl = false;
|
||||
|
||||
int gDebugDrawFlags = 0;
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -42,6 +42,8 @@ struct OpenGLGuiHelper : public GUIHelperInterface
|
||||
|
||||
virtual void setUpAxis(int axis);
|
||||
|
||||
void setVisualizerFlag(int flag, int enable);
|
||||
|
||||
virtual void resetCamera(float camDist, float pitch, float yaw, float camPosX,float camPosY, float camPosZ);
|
||||
|
||||
virtual void copyCameraImageData(const float viewMatrix[16], const float projectionMatrix[16],
|
||||
|
||||
Reference in New Issue
Block a user