Readded HW cursor manager (no image rotation yet)

This commit is contained in:
scrawl 2015-05-13 18:56:14 +02:00
parent 4825744a03
commit 9ea416b852
15 changed files with 270 additions and 276 deletions

View file

@ -102,7 +102,7 @@ void GraphicsWindowSDL2::init()
return;
}
setSyncToVBlank(_traits->vsync);
SDL_GL_SetSwapInterval(_traits->vsync ? 1 : 0);
SDL_GL_MakeCurrent(oldWin, oldCtx);
@ -182,7 +182,14 @@ void GraphicsWindowSDL2::swapBuffersImplementation()
void GraphicsWindowSDL2::setSyncToVBlank(bool on)
{
SDL_Window *oldWin = SDL_GL_GetCurrentWindow();
SDL_GLContext oldCtx = SDL_GL_GetCurrentContext();
SDL_GL_MakeCurrent(mWindow, mContext);
SDL_GL_SetSwapInterval(on ? 1 : 0);
SDL_GL_MakeCurrent(oldWin, oldCtx);
}
void GraphicsWindowSDL2::raiseWindow()