diff --git a/Demos/CommonPhysicsSetup.h b/Demos/CommonPhysicsSetup.h index 5b2828d76..2f18d1382 100644 --- a/Demos/CommonPhysicsSetup.h +++ b/Demos/CommonPhysicsSetup.h @@ -7,11 +7,14 @@ class btBoxShape; class btTransform; class btCollisionShape; #include "LinearMath/btVector3.h" +#include "CommonParameterInterface.h" + class btDiscreteDynamicsWorld; ///The GraphicsPhysicsBridge let's the graphics engine create graphics representation and synchronize struct GraphicsPhysicsBridge { + virtual void createRigidBodyGraphicsObject(btRigidBody* body,const btVector3& color) { } @@ -24,6 +27,12 @@ struct GraphicsPhysicsBridge virtual void createPhysicsDebugDrawer( btDiscreteDynamicsWorld* rbWorld) { } + + virtual CommonParameterInterface* getParameterInterface() + { + return 0; + } + }; struct CommonPhysicsSetup diff --git a/Demos/ConstraintDemo/ConstraintPhysicsSetup.cpp b/Demos/ConstraintDemo/ConstraintPhysicsSetup.cpp new file mode 100644 index 000000000..4b2de0f43 --- /dev/null +++ b/Demos/ConstraintDemo/ConstraintPhysicsSetup.cpp @@ -0,0 +1,70 @@ +#include "ConstraintPhysicsSetup.h" + +ConstraintPhysicsSetup::ConstraintPhysicsSetup() +{ +} +ConstraintPhysicsSetup::~ConstraintPhysicsSetup() +{ +} + +btScalar val; +btHingeAccumulatedAngleConstraint* spDoorHinge=0; +void ConstraintPhysicsSetup::stepSimulation(float deltaTime) +{ + val=spDoorHinge->getAccumulatedHingeAngle()*SIMD_DEGS_PER_RAD;// spDoorHinge->getHingeAngle()*SIMD_DEGS_PER_RAD; + if (m_dynamicsWorld) + { + m_dynamicsWorld->stepSimulation(deltaTime); + } +} + + + +void ConstraintPhysicsSetup::initPhysics(GraphicsPhysicsBridge& gfxBridge) +{ + createEmptyDynamicsWorld(); + + gfxBridge.createPhysicsDebugDrawer(m_dynamicsWorld); +int mode = btIDebugDraw::DBG_DrawWireframe + +btIDebugDraw::DBG_DrawConstraints + +btIDebugDraw::DBG_DrawConstraintLimits; + m_dynamicsWorld->getDebugDrawer()->setDebugMode(mode); + +val=1.f; + SliderParams slider("hinge angle",&val); +slider.m_minVal=-720; +slider.m_maxVal=720; + gfxBridge.getParameterInterface()->registerSliderFloatParameter(slider); + + + { // create a door using hinge constraint attached to the world + btCollisionShape* pDoorShape = new btBoxShape(btVector3(2.0f, 5.0f, 0.2f)); + m_collisionShapes.push_back(pDoorShape); + btTransform doorTrans; + doorTrans.setIdentity(); + doorTrans.setOrigin(btVector3(-5.0f, -2.0f, 0.0f)); + btRigidBody* pDoorBody = createRigidBody( 1.0, doorTrans, pDoorShape); + pDoorBody->setActivationState(DISABLE_DEACTIVATION); + const btVector3 btPivotA(10.f + 2.1f, -2.0f, 0.0f ); // right next to the door slightly outside + btVector3 btAxisA( 0.0f, 1.0f, 0.0f ); // pointing upwards, aka Y-axis + + spDoorHinge = new btHingeAccumulatedAngleConstraint( *pDoorBody, btPivotA, btAxisA ); + +// spDoorHinge->setLimit( 0.0f, SIMD_PI_2 ); + // test problem values +// spDoorHinge->setLimit( -SIMD_PI, SIMD_PI*0.8f); + +// spDoorHinge->setLimit( 1.f, -1.f); +// spDoorHinge->setLimit( -SIMD_PI*0.8f, SIMD_PI); +// spDoorHinge->setLimit( -SIMD_PI*0.8f, SIMD_PI, 0.9f, 0.3f, 0.0f); +// spDoorHinge->setLimit( -SIMD_PI*0.8f, SIMD_PI, 0.9f, 0.01f, 0.0f); // "sticky limits" + // spDoorHinge->setLimit( -SIMD_PI * 0.25f, SIMD_PI * 0.25f ); +// spDoorHinge->setLimit( 0.0f, 0.0f ); + m_dynamicsWorld->addConstraint(spDoorHinge); + spDoorHinge->setDbgDrawSize(btScalar(5.f)); + + //doorTrans.setOrigin(btVector3(-5.0f, 2.0f, 0.0f)); + //btRigidBody* pDropBody = localCreateRigidBody( 10.0, doorTrans, shape); + } + +} \ No newline at end of file diff --git a/Demos/ConstraintDemo/ConstraintPhysicsSetup.h b/Demos/ConstraintDemo/ConstraintPhysicsSetup.h new file mode 100644 index 000000000..e85853cb8 --- /dev/null +++ b/Demos/ConstraintDemo/ConstraintPhysicsSetup.h @@ -0,0 +1,16 @@ +#ifndef CONSTAINT_PHYSICS_SETUP_H +#define CONSTAINT_PHYSICS_SETUP_H + +#include "../CommonRigidBodySetup.h" + +struct ConstraintPhysicsSetup : public CommonRigidBodySetup +{ + ConstraintPhysicsSetup(); + virtual ~ConstraintPhysicsSetup(); + virtual void initPhysics(GraphicsPhysicsBridge& gfxBridge); + + virtual void stepSimulation(float deltaTime); + +}; + +#endif //CONSTAINT_PHYSICS_SETUP_H diff --git a/Demos3/AllBullet2Demos/BulletDemoEntries.h b/Demos3/AllBullet2Demos/BulletDemoEntries.h index 84334b0c3..b03fe08fe 100644 --- a/Demos3/AllBullet2Demos/BulletDemoEntries.h +++ b/Demos3/AllBullet2Demos/BulletDemoEntries.h @@ -5,6 +5,8 @@ #include "BulletDemoInterface.h" #include "../bullet2/BasicDemo/BasicDemo.h" #include "../bullet2/BasicDemo/HingeDemo.h" +#include "../bullet2/BasicDemo/HingeDemo.h" + #include "../bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.h" #include "../bullet2/FeatherstoneMultiBodyDemo/MultiDofDemo.h" @@ -12,6 +14,8 @@ #include "../bullet2/LuaDemo/LuaDemo.h" #include "../bullet2/ChainDemo/ChainDemo.h" #include "../../Demos/CcdPhysicsDemo/CcdPhysicsSetup.h" +#include "../../Demos/ConstraintDemo/ConstraintPhysicsSetup.h" + static BulletDemoInterface* MyCcdPhysicsDemoCreateFunc(SimpleOpenGL3App* app) { @@ -25,6 +29,13 @@ static BulletDemoInterface* MyKinematicObjectCreateFunc(SimpleOpenGL3App* app) return new BasicDemo(app, physicsSetup); } +static BulletDemoInterface* MyConstraintCreateFunc(SimpleOpenGL3App* app) +{ + CommonPhysicsSetup* physicsSetup = new ConstraintPhysicsSetup(); + return new BasicDemo(app, physicsSetup); +} + + struct BulletDemoEntry { int m_menuLevel; @@ -42,6 +53,7 @@ static BulletDemoEntry allDemos[]= {1,"BasicDemo",BasicDemo::MyCreateFunc}, { 1, "CcdDemo", MyCcdPhysicsDemoCreateFunc }, { 1, "Kinematic", MyKinematicObjectCreateFunc }, + { 1, "Constraints", MyConstraintCreateFunc }, /* {1,"ChainDemo",ChainDemo::MyCreateFunc}, // {0, "Stress tests", 0 }, diff --git a/Demos3/AllBullet2Demos/GwenParameterInterface.cpp b/Demos3/AllBullet2Demos/GwenParameterInterface.cpp new file mode 100644 index 000000000..6df0a26d3 --- /dev/null +++ b/Demos3/AllBullet2Demos/GwenParameterInterface.cpp @@ -0,0 +1,142 @@ +#include "GwenParameterInterface.h" +#include "../GpuDemos/gwenInternalData.h" + + +template +struct MySliderEventHandler : public Gwen::Event::Handler +{ + Gwen::Controls::TextBox* m_label; + Gwen::Controls::Slider* m_pSlider; + char m_variableName[1024]; + T* m_targetValue; + + MySliderEventHandler(const char* varName, Gwen::Controls::TextBox* label, Gwen::Controls::Slider* pSlider,T* target) + :m_label(label), + m_pSlider(pSlider), + m_targetValue(target) + { + memcpy(m_variableName,varName,strlen(varName)+1); + } + + + void SliderMoved( Gwen::Controls::Base* pControl ) + { + Gwen::Controls::Slider* pSlider = (Gwen::Controls::Slider*)pControl; + //printf("value = %f\n", pSlider->GetValue());//UnitPrint( Utility::Format( L"Slider Value: %.2f", pSlider->GetValue() ) ); + float bla = pSlider->GetValue(); + T v = T(bla); + SetValue(v); + + } + + void SetValue(T v) + { + if (v < m_pSlider->GetRangeMin()) + { + printf("?\n"); + } + + if (v > m_pSlider->GetRangeMax()) + { + printf("?\n"); + + } + m_pSlider->SetValue(v,true); + (*m_targetValue) = v; + float val = float(v);//todo: specialize on template type + char txt[1024]; + sprintf(txt,"%s : %.3f", m_variableName,val); + m_label->SetText(txt); + + } +}; + + +struct GwenParameters +{ + b3AlignedObjectArray*> m_sliderEventHandlers; + b3AlignedObjectArray m_sliders; + b3AlignedObjectArray m_textLabels; + int m_savedYposition; +}; + +GwenParameterInterface::GwenParameterInterface(GwenInternalData* gwenInternalData) +:m_gwenInternalData(gwenInternalData) +{ + m_paramInternalData = new GwenParameters; + m_paramInternalData->m_savedYposition = m_gwenInternalData->m_curYposition; + +} + +GwenParameterInterface::~GwenParameterInterface() +{ + + removeAllParameters(); + delete m_paramInternalData; +} + + + +#include +void GwenParameterInterface::registerSliderFloatParameter(SliderParams& params) +{ + Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox(m_gwenInternalData->m_demoPage->GetPage()); + m_paramInternalData->m_textLabels.push_back(label); + //m_data->m_myControls.push_back(label); + label->SetText( params.m_name); + label->SetPos( 10, 10 + 25 ); + label->SetWidth(110); + label->SetPos(10,m_gwenInternalData->m_curYposition); + m_gwenInternalData->m_curYposition+=22; + + Gwen::Controls::HorizontalSlider* pSlider = new Gwen::Controls::HorizontalSlider( m_gwenInternalData->m_demoPage->GetPage()); + m_paramInternalData->m_sliders.push_back(pSlider); + //m_data->m_myControls.push_back(pSlider); + pSlider->SetPos( 10, m_gwenInternalData->m_curYposition ); + pSlider->SetSize( 100, 20 ); + pSlider->SetRange( params.m_minVal, params.m_maxVal); + pSlider->SetNotchCount(20);//float(params.m_maxVal-params.m_minVal)/100.f); + pSlider->SetClampToNotches( params.m_clampToNotches ); + pSlider->SetValue( *params.m_paramValuePointer);//dimensions[i] ); + char labelName[1024]; + sprintf(labelName,"%s",params.m_name);//axisNames[0]); + MySliderEventHandler* handler = new MySliderEventHandler(labelName,label,pSlider,params.m_paramValuePointer); + m_paramInternalData->m_sliderEventHandlers.push_back(handler); + + pSlider->onValueChanged.Add( handler, &MySliderEventHandler::SliderMoved ); + handler->SliderMoved(pSlider); + float v = pSlider->GetValue(); + m_gwenInternalData->m_curYposition+=22; +} + +void GwenParameterInterface::syncParameters() +{ + for (int i=0;im_sliderEventHandlers.size();i++) + { + MySliderEventHandler* handler = m_paramInternalData->m_sliderEventHandlers[i]; + handler->m_pSlider->SetValue(*handler->m_targetValue,true); + } +} + +void GwenParameterInterface::removeAllParameters() +{ + for (int i=0;im_sliders.size();i++) + { + delete m_paramInternalData->m_sliders[i]; + } + m_paramInternalData->m_sliders.clear(); + + for (int i=0;im_sliderEventHandlers.size();i++) + { + delete m_paramInternalData->m_sliderEventHandlers[i]; + } + m_paramInternalData->m_sliderEventHandlers.clear(); + + for (int i=0;im_textLabels.size();i++) + { + delete m_paramInternalData->m_textLabels[i]; + } + m_paramInternalData->m_textLabels.clear(); + + m_gwenInternalData->m_curYposition = this->m_paramInternalData->m_savedYposition; +} \ No newline at end of file diff --git a/Demos3/AllBullet2Demos/GwenParameterInterface.h b/Demos3/AllBullet2Demos/GwenParameterInterface.h new file mode 100644 index 000000000..a36741dd9 --- /dev/null +++ b/Demos3/AllBullet2Demos/GwenParameterInterface.h @@ -0,0 +1,20 @@ +#ifndef GWEN_PARAMETER_INTERFACE_H +#define GWEN_PARAMETER_INTERFACE_H + +#include "../../Demos/CommonParameterInterface.h" + +struct GwenParameterInterface : public CommonParameterInterface +{ + struct GwenInternalData* m_gwenInternalData; + + struct GwenParameters* m_paramInternalData; + + GwenParameterInterface(struct GwenInternalData* gwenInternalData); + virtual ~GwenParameterInterface(); + virtual void registerSliderFloatParameter(SliderParams& params); + virtual void syncParameters(); + virtual void removeAllParameters(); + +}; + +#endif//GWEN_PARAMETER_INTERFACE_H diff --git a/Demos3/AllBullet2Demos/main.cpp b/Demos3/AllBullet2Demos/main.cpp index 9d9d0ca0a..230ceaf63 100644 --- a/Demos3/AllBullet2Demos/main.cpp +++ b/Demos3/AllBullet2Demos/main.cpp @@ -6,6 +6,8 @@ #include "../GpuDemos/gwenUserInterface.h" #include "BulletDemoEntries.h" #include "../../btgui/Timing/b3Clock.h" +#include "GwenParameterInterface.h" + #define DEMO_SELECTION_COMBOBOX 13 const char* startFileName = "bulletDemo.txt"; static SimpleOpenGL3App* app=0; @@ -114,6 +116,7 @@ void selectDemo(int demoIndex) } if (allDemos[demoIndex].m_createFunc && app) { + app->m_parameterInterface->removeAllParameters(); sCurrentDemo = (*allDemos[demoIndex].m_createFunc)(app); if (sCurrentDemo) { @@ -225,81 +228,6 @@ struct MyMenuItemHander :public Gwen::Event::Handler -template -struct MySliderEventHandler : public Gwen::Event::Handler -{ - Gwen::Controls::TextBox* m_label; - Gwen::Controls::Slider* m_pSlider; - char m_variableName[1024]; - T* m_targetValue; - - MySliderEventHandler(const char* varName, Gwen::Controls::TextBox* label, Gwen::Controls::Slider* pSlider,T* target) - :m_label(label), - m_pSlider(pSlider), - m_targetValue(target) - { - memcpy(m_variableName,varName,strlen(varName)+1); - } - - - void SliderMoved( Gwen::Controls::Base* pControl ) - { - Gwen::Controls::Slider* pSlider = (Gwen::Controls::Slider*)pControl; - //printf("value = %f\n", pSlider->GetValue());//UnitPrint( Utility::Format( L"Slider Value: %.2f", pSlider->GetValue() ) ); - float bla = pSlider->GetValue(); - T v = T(bla); - SetValue(v); - - } - - void SetValue(T v) - { - if (v < m_pSlider->GetRangeMin()) - { - printf("?\n"); - } - - if (v > m_pSlider->GetRangeMax()) - { - printf("?\n"); - - } - m_pSlider->SetValue(v,true); - (*m_targetValue) = v; - int val = int(v);//todo: specialize on template type - char txt[1024]; - sprintf(txt,"%s : %d", m_variableName,val); - m_label->SetText(txt); - - } -}; -void MyParameter(const char* name, GwenInternalData* data, double* param) -{ - Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox(data->m_demoPage->GetPage()); - //m_data->m_myControls.push_back(label); - label->SetText( name); - label->SetPos( 10, 10 + 25 ); - label->SetWidth(110); - label->SetPos(10,data->m_curYposition); - data->m_curYposition+=22; - - Gwen::Controls::HorizontalSlider* pSlider = new Gwen::Controls::HorizontalSlider( data->m_demoPage->GetPage()); - //m_data->m_myControls.push_back(pSlider); - pSlider->SetPos( 10, data->m_curYposition ); - pSlider->SetSize( 100, 20 ); - pSlider->SetRange( -10, 10 ); - pSlider->SetNotchCount(10); - pSlider->SetClampToNotches( true ); - pSlider->SetValue( *param);//dimensions[i] ); - char labelName[1024]; - sprintf(labelName,"%s",name);//axisNames[0]); - MySliderEventHandler* handler = new MySliderEventHandler(labelName,label,pSlider,param); - pSlider->onValueChanged.Add( handler, &MySliderEventHandler::SliderMoved ); - handler->SliderMoved(pSlider); - float v = pSlider->GetValue(); - data->m_curYposition+=22; -} - extern float shadowMapWorldSize; int main(int argc, char* argv[]) { @@ -318,6 +246,7 @@ int main(int argc, char* argv[]) app->m_window->setMouseMoveCallback(MyMouseMoveCallback); app->m_window->setMouseButtonCallback(MyMouseButtonCallback); app->m_window->setKeyboardCallback(MyKeyboardCallback); + GLint err = glGetError(); assert(err==GL_NO_ERROR); @@ -328,6 +257,10 @@ int main(int argc, char* argv[]) // gui->getInternalData()->m_explorerPage Gwen::Controls::TreeControl* tree = gui->getInternalData()->m_explorerTreeCtrl; + + + app->m_parameterInterface = new GwenParameterInterface(gui->getInternalData()); + //gui->getInternalData()->m_demoPage; int numDemos = sizeof(allDemos)/sizeof(BulletDemoEntry); @@ -390,9 +323,7 @@ int main(int argc, char* argv[]) */ unsigned long int prevTimeInMicroseconds = clock.getTimeMicroseconds(); - MyParameter("Motor A",gui->getInternalData(),&motorA); - MyParameter("Motor B",gui->getInternalData(),&motorB); - + do { @@ -438,6 +369,7 @@ int main(int argc, char* argv[]) gui->draw(app->m_instancingRenderer->getScreenWidth(),app->m_instancingRenderer->getScreenHeight()); } toggle=1-toggle; + app->m_parameterInterface->syncParameters(); app->swapBuffer(); } while (!app->m_window->requestedExit()); diff --git a/Demos3/AllBullet2Demos/premake4.lua b/Demos3/AllBullet2Demos/premake4.lua index e9a3a3d59..93a648b63 100644 --- a/Demos3/AllBullet2Demos/premake4.lua +++ b/Demos3/AllBullet2Demos/premake4.lua @@ -27,6 +27,8 @@ "../../Demos/BasicDemo/BasicDemoPhysicsSetup.h", "../../Demos/CcdPhysicsDemo/CcdPhysicsSetup.cpp", "../../Demos/CcdPhysicsDemo/CcdPhysicsSetup.h", + "../../Demos/ConstraintDemo/ConstraintPhysicsSetup.cpp", + "../../Demos/ConstraintDemo/ConstraintPhysicsSetup.h", "../bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp", "../bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.h", "../bullet2/FeatherstoneMultiBodyDemo/MultiDofDemo.cpp", diff --git a/Demos3/GpuDemos/gwenUserInterface.cpp b/Demos3/GpuDemos/gwenUserInterface.cpp index dc306994a..bd45630ee 100644 --- a/Demos3/GpuDemos/gwenUserInterface.cpp +++ b/Demos3/GpuDemos/gwenUserInterface.cpp @@ -31,12 +31,25 @@ GwenUserInterface::~GwenUserInterface() delete coreRend; } - + +class MyMenuItems : public Gwen::Controls::Base +{ +public: + + MyMenuItems() :Gwen::Controls::Base(0) + { + } + void myQuitApp( Gwen::Controls::Base* pControl ) + { + exit(0); + } +}; struct MyTestMenuBar : public Gwen::Controls::MenuStrip { +MyMenuItems* menuItems = new MyMenuItems; MyTestMenuBar(Gwen::Controls::Base* pParent) :Gwen::Controls::MenuStrip(pParent) @@ -44,7 +57,7 @@ struct MyTestMenuBar : public Gwen::Controls::MenuStrip // Gwen::Controls::MenuStrip* menu = new Gwen::Controls::MenuStrip( pParent ); { Gwen::Controls::MenuItem* pRoot = AddItem( L"File" ); - + pRoot->GetMenu()->AddItem(L"Quit",menuItems,(Gwen::Event::Handler::Function)&MyMenuItems::myQuitApp); pRoot = AddItem( L"View" ); // Gwen::Event::Handler* handler = GWEN_MCALL(&MyTestMenuBar::MenuItemSelect ); pRoot->GetMenu()->AddItem( L"Profiler");//,,m_profileWindow,(Gwen::Event::Handler::Function)&MyProfileWindow::MenuItemSelect); diff --git a/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.cpp b/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.cpp index 8c721a023..4ef48ddc0 100644 --- a/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.cpp +++ b/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.cpp @@ -140,6 +140,11 @@ struct MyGraphicsPhysicsBridge : public GraphicsPhysicsBridge ); } + + virtual CommonParameterInterface* getParameterInterface() + { + return m_glApp->m_parameterInterface; + } }; Bullet2RigidBodyDemo::Bullet2RigidBodyDemo(SimpleOpenGL3App* app, CommonPhysicsSetup* physicsSetup) diff --git a/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.h b/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.h index a7475323b..7cf7a85a4 100644 --- a/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.h +++ b/Demos3/bullet2/BasicDemo/Bullet2RigidBodyDemo.h @@ -28,7 +28,10 @@ public: virtual void renderScene(); virtual void physicsDebugDraw(); virtual void stepSimulation(float dt); - + virtual CommonPhysicsSetup* getPhysicsSetup() + { + return m_physicsSetup; + } virtual ~Bullet2RigidBodyDemo(); btVector3 getRayTo(int x,int y); diff --git a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp index 9b0a85b34..b3a739194 100644 --- a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp +++ b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp @@ -41,6 +41,7 @@ struct SimpleInternalData const char* m_frameDumpPngFileName; FILE* m_ffmpegFile; GLRenderToTexture* m_renderTexture; + void* m_userPointer; }; @@ -83,6 +84,7 @@ SimpleOpenGL3App::SimpleOpenGL3App( const char* title, int width,int height) m_data->m_frameDumpPngFileName = 0; m_data->m_renderTexture = 0; m_data->m_ffmpegFile = 0; + m_data->m_userPointer = 0; m_window = new b3gDefaultOpenGLWindow(); b3gWindowConstructionInfo ci; @@ -117,6 +119,7 @@ SimpleOpenGL3App::SimpleOpenGL3App( const char* title, int width,int height) b3Assert(glGetError() ==GL_NO_ERROR); m_primRenderer = new GLPrimitiveRenderer(width,height); + m_parameterInterface = 0; b3Assert(glGetError() ==GL_NO_ERROR); diff --git a/btgui/OpenGLWindow/SimpleOpenGL3App.h b/btgui/OpenGLWindow/SimpleOpenGL3App.h index 9bfa64e2c..eb4be1f6d 100644 --- a/btgui/OpenGLWindow/SimpleOpenGL3App.h +++ b/btgui/OpenGLWindow/SimpleOpenGL3App.h @@ -31,6 +31,7 @@ struct SimpleOpenGL3App class b3gWindowInterface* m_window; class GLPrimitiveRenderer* m_primRenderer; class GLInstancingRenderer* m_instancingRenderer; + struct CommonParameterInterface* m_parameterInterface; SimpleOpenGL3App(const char* title, int width,int height); virtual ~SimpleOpenGL3App(); @@ -46,6 +47,7 @@ struct SimpleOpenGL3App void drawText( const char* txt, int posX, int posY); struct sth_stash* getFontStash(); + }; #endif //SIMPLE_OPENGL3_APP_H