diff --git a/Demos3/AllBullet2Demos/main.cpp b/Demos3/AllBullet2Demos/main.cpp index aef69b9e0..9e5379b04 100644 --- a/Demos3/AllBullet2Demos/main.cpp +++ b/Demos3/AllBullet2Demos/main.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) GLint err = glGetError(); assert(err==GL_NO_ERROR); - sth_stash* fontstash=0; + sth_stash* fontstash=app->getFontStash(); gui = new GwenUserInterface; gui->init(width,height,fontstash,app->m_window->getRetinaScale()); diff --git a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp index 15982df15..080f15834 100644 --- a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp +++ b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp @@ -132,7 +132,10 @@ SimpleOpenGL3App::SimpleOpenGL3App( const char* title, int width,int height) } - +struct sth_stash* SimpleOpenGL3App::getFontStash() +{ + return m_data->m_fontStash; +} diff --git a/btgui/OpenGLWindow/SimpleOpenGL3App.h b/btgui/OpenGLWindow/SimpleOpenGL3App.h index ff9ef7321..d282c58b6 100644 --- a/btgui/OpenGLWindow/SimpleOpenGL3App.h +++ b/btgui/OpenGLWindow/SimpleOpenGL3App.h @@ -21,6 +21,7 @@ struct SimpleOpenGL3App void drawGrid(int gridSize=10, float yOffset=0.001); void swapBuffer(); void drawText( const char* txt, int posX, int posY); + struct sth_stash* getFontStash(); };