Firstly, sorry for the poor question title, I didn't know exactly what to put!
So I have an OpenGL application running from a SFML Window context.
I previously posted a question about poor performance, but that issue seems to be solved now.
As you can see on the images I have uploaded, something rather odd is happening. I don't know really how to describe it, but it looks like the right half of the window shouldn't be there!
Anyone any ideas on the problem?
Here is my code:
sf::ContextSettings settings;
settings.depthBits = 32;
settings.stencilBits = 8;
settings.antialiasingLevel=4;
settings.majorVersion = 3;
settings.minorVersion = 0;
sf::Window window(sf::VideoMode(800, 600), "insert title", sf::Style::Default, settings);
window.setVerticalSyncEnabled(true);
bool running = true;
while(running)
{
sf::Event e;
while(window.pollEvent(e))
{
if(e.type == sf::Event::Closed)
{
running = false;
}
if(e.type == sf::Event::Resized)
{
glViewport(0, 0, e.size.width, e.size.height);
gluLookAt(0,0,-1, 0,0,0, 0,1,0);;
}
}
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glutSolidSphere(1, 12, 12);
window.display();
}