expose video capture as logging command in b3RobotSimulatorClientAPI (C++) and pybullet (use STATE_LOGGING_VIDEO_MP4)

This commit is contained in:
Erwin Coumans
2017-03-16 09:13:33 -07:00
parent b7b46b12d3
commit 59d16b2c42
16 changed files with 180 additions and 22 deletions

View File

@@ -191,6 +191,8 @@ SET(BulletExampleBrowser_SRCS
../SharedMemory/PhysicsLoopBackC_API.h
../SharedMemory/PhysicsServerCommandProcessor.cpp
../SharedMemory/PhysicsServerCommandProcessor.h
../SharedMemory/SharedMemoryCommands.h
../SharedMemory/SharedMemoryPublic.h
../BasicDemo/BasicExample.cpp
../BasicDemo/BasicExample.h
../InverseDynamics/InverseDynamicsExample.cpp

View File

@@ -371,6 +371,7 @@ void OpenGLExampleBrowserVisualizerFlagCallback(int flag, bool enable)
if (flag == COV_ENABLE_GUI)
{
renderGui = enable;
renderGrid = enable;
}
if (flag == COV_ENABLE_WIREFRAME)
@@ -868,8 +869,8 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
}
int width = 1024;
int height=768;
int width = 1280;
int height=640;
#ifndef NO_OPENGL3
SimpleOpenGL3App* simpleApp=0;
sUseOpenGL2 =args.CheckCmdLineFlag("opengl2");

View File

@@ -568,3 +568,10 @@ struct CommonGraphicsApp* OpenGLGuiHelper::getAppInterface()
return m_data->m_glApp;
}
void OpenGLGuiHelper::dumpFramesToVideo(const char* mp4FileName)
{
if (m_data->m_glApp)
{
m_data->m_glApp->dumpFramesToVideo(mp4FileName);
}
}

View File

@@ -85,6 +85,8 @@ struct OpenGLGuiHelper : public GUIHelperInterface
virtual void setVisualizerFlagCallback(VisualizerFlagCallback callback);
virtual void dumpFramesToVideo(const char* mp4FileName);
};
#endif //OPENGL_GUI_HELPER_H

View File

@@ -88,6 +88,8 @@ project "App_BulletExampleBrowser"
"../SharedMemory/PhysicsServerCommandProcessor.h",
"../SharedMemory/TinyRendererVisualShapeConverter.cpp",
"../SharedMemory/TinyRendererVisualShapeConverter.h",
"../SharedMemory/SharedMemoryCommands.h",
"../SharedMemory/SharedMemoryPublic.h",
"../MultiThreading/MultiThreadingExample.cpp",
"../MultiThreading/b3PosixThreadSupport.cpp",
"../MultiThreading/b3Win32ThreadSupport.cpp",