1
0
Fork 0

Always clear drawing area. Should fix certain linux instalations that use triple buffering

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4229
This commit is contained in:
Peter Veenstra 2019-06-02 19:40:59 +00:00
parent ee236a7e5a
commit ffdcc16af5

View file

@ -1004,6 +1004,10 @@ void GFX_EndUpdate( const Bit16u *changedLines ) {
break;
#if C_OPENGL
case SCREEN_OPENGL:
// Clear drawing area. Some drivers (on Linux) have more than 2 buffers and the screen might
// be dirty because of other programs.
glClearColor (0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
if (sdl.opengl.pixel_buffer_object) {
glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
glBindTexture(GL_TEXTURE_2D, sdl.opengl.texture);