Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Sagittarius

#1
Help requests / Re: conflict with OpenGL
01 February 2015, 15:45:38
Yes, it does crash if i put

sf::Texture texture;
if (!texture.loadFromFile("dashboard_bg.tga"))
    return -1;


instead of picture creation code.
#2
Help requests / Re: conflict with OpenGL
01 February 2015, 15:43:11
Thanks, i didn't know that, changed the draw code to:

if(!windowClosed) {
renderScene(); //my render

mainWindow.pushGLStates();

mainGui.draw();
mainWindow.display();

mainWindow.popGLStates();
}


But unfortunately, behavior is the same.
#3
Help requests / conflict with OpenGL
01 February 2015, 15:31:00
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:
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:

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.