Removed redundant glError? from Map class and renamed CommonMethods#glError? to #gl_error?, added debug settings for disabling shaders and whether to exit on opengl error

This commit is contained in:
2020-01-27 22:19:07 -06:00
parent 75f94963b2
commit e7b84bd123
8 changed files with 34 additions and 31 deletions

View File

@@ -43,12 +43,12 @@ class IMICFPS
draw_rect(0, 0, window.width, window.height, color)
end
def handleGlError
def gl_error?
e = glGetError()
if e != GL_NO_ERROR
$stderr.puts "OpenGL error detected by handler at: #{caller[0]}"
$stderr.puts " #{gluErrorString(e)} (#{e})\n"
exit
exit if $debug && $debug.get(:opengl_error_panic)
end
end
end