implemented vsynch for d3d9 and glfw

This commit is contained in:
aap
2020-05-02 10:08:19 +02:00
parent 3704fe8a9f
commit b3ad490d1b
10 changed files with 35 additions and 15 deletions

View File

@@ -761,12 +761,16 @@ clearCamera(Camera *cam, RGBA *col, uint32 mode)
}
static void
showRaster(Raster *raster)
showRaster(Raster *raster, uint32 flags)
{
// TODO: do this properly!
#ifdef LIBRW_SDL2
SDL_GL_SwapWindow(glGlobals.window);
#else
if(flags & Raster::FLIPWAITVSYNCH)
glfwSwapInterval(1);
else
glfwSwapInterval(0);
glfwSwapBuffers(glGlobals.window);
#endif
}