From: Alexis Laferrière Date: Wed, 16 Aug 2017 02:29:22 +0000 (-0400) Subject: gamnit: print current config and list extensions X-Git-Url: http://nitlanguage.org gamnit: print current config and list extensions Signed-off-by: Alexis Laferrière --- diff --git a/lib/gamnit/display.nit b/lib/gamnit/display.nit index 2b694c6..868b359 100644 --- a/lib/gamnit/display.nit +++ b/lib/gamnit/display.nit @@ -72,4 +72,7 @@ class GamnitDisplay # # The implementation varies per platform. fun feed_events do end + + # Extensions to OpenGL ES 2.0 supported by the current configuration + var gl_extensions: Array[String] is lazy do return glGetString(gl_EXTENSIONS).split(' ') end diff --git a/lib/gamnit/gamnit.nit b/lib/gamnit/gamnit.nit index fccf2ae..bd26cbd 100644 --- a/lib/gamnit/gamnit.nit +++ b/lib/gamnit/gamnit.nit @@ -36,6 +36,13 @@ redef class App var display = new GamnitDisplay display.setup self.display = display + + # Print the current GL configuration, for debugging + print "GL vendor: {glGetString(gl_VENDOR)}" + print "GL renderer: {glGetString(gl_RENDERER)}" + print "GL version: {glGetString(gl_VERSION)}" + print "GLSL version: {glGetString(gl_SHADING_LANGUAGE_VERSION)}" + print "GL extensions: {glGetString(gl_EXTENSIONS)}" end # Core of the frame logic, executed only when the display is visible