Hey, have a bit of an urgent problem while trying to use TGUI(0.6.6.2 for VS 2010) in a program that already uses SFML 2.2 for window\opengl_context\input.
First i initialize TGUI:
i have mainGui.handleEvent(currentEvent); and mainGui.draw(); in my main loop;
It compiles and runs fine.
But as soon as i create picture like this:
It breaks my OpenGL render. Causing it to crash on glBindVertexArray or glDrawElements. According to gDebugger, the vertex array i use is not valid when i pass it to glBindVertexArray , although it is allocated after i setup gui create picture. Is this for reals(i dunno, maybe you expect me to use SFML's classes instead of proper OpenGL or is this a bug\my misunderstanding of how TGUI works?
P.S. commenting out mainGui.draw() doesn't stop the problem; it's the creation of gui object that cuases it.
First i initialize TGUI:
Code Select
tgui::Gui mainGui;
...
mainGui.setWindow(mainWindow);
mainGui.setGlobalFont("Calibri.ttf");
i have mainGui.handleEvent(currentEvent); and mainGui.draw(); in my main loop;
It compiles and runs fine.
But as soon as i create picture like this:
Code Select
tgui::Picture::Ptr dashboard_bg(mainGui, "dashboard_bg");
dashboard_bg->load("dashboard_bg.tga");
dashboard_bg->setSize(600, 100);
It breaks my OpenGL render. Causing it to crash on glBindVertexArray or glDrawElements. According to gDebugger, the vertex array i use is not valid when i pass it to glBindVertexArray , although it is allocated after i setup gui create picture. Is this for reals(i dunno, maybe you expect me to use SFML's classes instead of proper OpenGL or is this a bug\my misunderstanding of how TGUI works?
P.S. commenting out mainGui.draw() doesn't stop the problem; it's the creation of gui object that cuases it.