2022-01-15 14:31:19 +01:00
|
|
|
from OpenGL.GLU import *
|
|
|
|
from OpenGL.GL import *
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
|
2020-11-08 10:20:23 +01:00
|
|
|
|
|
|
|
class Renderable:
|
2022-01-15 14:31:19 +01:00
|
|
|
def render(self, projMatrix, geometryRotMatrix, alternateprograms=None,
|
|
|
|
preselected_program=None, projection_pos=None, rot_pos=None):
|
2020-11-08 10:20:23 +01:00
|
|
|
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
|
2022-01-15 14:31:19 +01:00
|
|
|
return False
|