When I added the code to manage the view, the screen in my window began flickering (IE, objects began to flicker black, the background colour). VSync has already been set on the window.
void GameManager::render() const
{
// Clear the window
window->Clear();
//Manage view
View view = window->GetDefaultView();
if(viewObject)
{
view.SetCenter(viewObject->getPosition(currentFrameTime));
view.Zoom(viewZoom);
}
window->SetView(view);
//Render all objects
for(list<GameObject *>::const_iterator iter = gameObjects.begin(); iter != gameObjects.end(); iter++)
{
GameObject *obj = (*iter);
obj->render(GetTime(), window);
}
// Display things on screen
window->Display();
}
Anyone know what's causing the flickering?