mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
clear buffers to avoid artifacts
This commit is contained in:
parent
325bc417b6
commit
302d13e703
1 changed files with 6 additions and 1 deletions
|
@ -22,8 +22,9 @@ from PyQt4.QtOpenGL import QGLFormat
|
|||
try:
|
||||
# nvidia hack
|
||||
from OpenGL import GL
|
||||
glimport = True
|
||||
except ImportError:
|
||||
pass
|
||||
glimport = False
|
||||
|
||||
from m64py.core.defs import *
|
||||
from m64py.opts import SDL2
|
||||
|
@ -99,6 +100,10 @@ class Video():
|
|||
"""Creates a rendering window."""
|
||||
self.glcontext.makeCurrent()
|
||||
if self.glcontext.isValid():
|
||||
if glimport:
|
||||
GL.glClearColor(0.0, 0.0, 0.0, 1.0);
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
|
||||
self.widget.swapBuffers()
|
||||
return M64ERR_SUCCESS
|
||||
else:
|
||||
return M64ERR_SYSTEM_FAIL
|
||||
|
|
Loading…
Add table
Reference in a new issue