18 lines
541 B
Python
18 lines
541 B
Python
|
from OpenGL.GLU import gluErrorString
|
||
|
from OpenGL.GL import glGetError, GL_NO_ERROR
|
||
|
|
||
|
class Renderable:
|
||
|
def render(self, projMatrix, geometryRotMatrix, alternateprograms=None):
|
||
|
pass
|
||
|
|
||
|
@staticmethod
|
||
|
def check_error(message):
|
||
|
gl_error = glGetError()
|
||
|
if (gl_error != GL_NO_ERROR):
|
||
|
print("Error: " + message)
|
||
|
if (gluErrorString(gl_error)):
|
||
|
print(gluErrorString(gl_error))
|
||
|
else:
|
||
|
print(hex(gl_error))
|
||
|
return True
|
||
|
return False
|