Fix for bug #17793: the glFinish() call in ghost that was disabled in a previous commit, because it was causing performance issues for the game engine, apparently still is needed to solved issues with FSAA. Now instead it will still call this for blender but not anymore for blenderplayer.

This commit is contained in:
Brecht Van Lommel 2008-10-11 16:03:17 +00:00
parent b2a179c2ac
commit ec7407f942
2 changed files with 10 additions and 10 deletions

@ -434,16 +434,6 @@ GHOST_TSuccess GHOST_WindowWin32::setOrder(GHOST_TWindowOrder order)
GHOST_TSuccess GHOST_WindowWin32::swapBuffers() GHOST_TSuccess GHOST_WindowWin32::swapBuffers()
{ {
// adding a glFinish() here is to prevent Geforce in 'full scene antialias' mode
// from antialising the Blender window. Officially a swapbuffers does a glFinish
// itself, so this feels really like a hack... but it won't harm. (ton)
//
// disabled this because it is a performance killer for the game engine, glFinish
// forces synchronization with the graphics card and calling it is strongly
// discouraged for good performance. (brecht)
//
// glFinish();
return ::SwapBuffers(m_hDC) == TRUE ? GHOST_kSuccess : GHOST_kFailure; return ::SwapBuffers(m_hDC) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
} }

@ -478,6 +478,16 @@ void window_make_active(Window *win) {
} }
void window_swap_buffers(Window *win) { void window_swap_buffers(Window *win) {
// adding a glFinish() here is to prevent Geforce in 'full scene antialias' mode
// from antialising the Blender window. Officially a swapbuffers does a glFinish
// itself, so this feels really like a hack... but it won't harm. (ton)
//
// moved it here from ghost because it is a performance killer for the game engine,
// glFinish forces synchronization with the graphics card and calling it is strongly
// discouraged for good performance. (brecht)
//
glFinish();
GHOST_SwapWindowBuffers(win->ghostwin); GHOST_SwapWindowBuffers(win->ghostwin);
} }