I'm trying to draw a texture and a string after rendering the OpenGL stuff. It worked fine before and then it suddenly started glitching at one point. I use FBOs for post-processing, so the final step is just rendering an FBO texture on screen. I don't see what the problem could be here, any lingering OpenGL states that aren't pushed?
This is the code I'm testing with:
sf::RenderWindow window(sf::VideoMode(WIDTH, HEIGHT, 32),
"Game", sf::Style::Titlebar | sf::Style::Close, sf::ContextSettings(32)
);
...
glUseProgram(0);
glBindVertexArray(0);
glActiveTexture(0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindTexture(GL_TEXTURE_2D, 0);
window.pushGLStates();
sf::Sprite spr;
spr.setPosition(sf::Vector2f(10.f, 10.f));
spr.setScale(sf::Vector2f(2.f, 2.f));
spr.setTexture(TEX[3]);
text.setString("test string 1");
text.setPosition(sf::Vector2f(10.f, 10.f));
window.draw(spr);
window.draw(text);
window.popGLStates();
window.display();
And this is what I get:
Thanks.