improve usability of ExampleBrowser
store command-line arguments in bulletDemo.txt save/load of configuration, save demo name instead of index add setBackgroundColor as example (background_color_red) and mouse move/wheel speed config (mouse_wheel_multiplier and mouse_move_multiplier) (saved after changing the demo) default btIDebugDraw colors can be changed b3CommandLineArgs::GetCmdLineArgument returns bool, and b3CommandLineArgs::addArgs added fix copy/paste
This commit is contained in:
@@ -137,7 +137,11 @@ SimpleOpenGL2App::SimpleOpenGL2App(const char* title, int width, int height)
|
||||
|
||||
|
||||
glGetError();//don't remove this call, it is needed for Ubuntu
|
||||
glClearColor(0.9,0.9,1,1);
|
||||
glClearColor( m_backgroundColorRGB[0],
|
||||
m_backgroundColorRGB[1],
|
||||
m_backgroundColorRGB[2],
|
||||
1.f);
|
||||
|
||||
|
||||
b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
|
||||
@@ -168,6 +172,12 @@ SimpleOpenGL2App::~SimpleOpenGL2App()
|
||||
delete m_data;
|
||||
}
|
||||
|
||||
void SimpleOpenGL2App::setBackgroundColor(float red, float green, float blue)
|
||||
{
|
||||
CommonGraphicsApp::setBackgroundColor(red,green,blue);
|
||||
glClearColor(m_backgroundColorRGB[0],m_backgroundColorRGB[1],m_backgroundColorRGB[2],1.f);
|
||||
}
|
||||
|
||||
void SimpleOpenGL2App::drawGrid(DrawGridData data)
|
||||
{
|
||||
int gridSize = data.gridSize;
|
||||
|
||||
Reference in New Issue
Block a user