protected void getAvailableExtensions() { // For a complete list of extensions, go to this sections in the openGL // registry: // http://www.opengl.org/registry/#arbextspecs // http://www.opengl.org/registry/#otherextspecs String extensions = gl.glGetString(GL.GL_EXTENSIONS); if (extensions.indexOf("GL_ARB_multitexture") == -1) { multiTexAvailable = false; System.out.println("GL_ARB_multitexture extension not available"); } if (extensions.indexOf("GL_ARB_vertex_buffer_object") == -1) { vbosAvailable = false; System.out.println("GL_ARB_vertex_buffer_object extension not available"); } if (extensions.indexOf("GL_EXT_framebuffer_object") == -1) { fbosAvailable = false; System.out.println("GL_EXT_framebuffer_object extension not available"); } if (extensions.indexOf("GL_ARB_shader_objects") == -1) { shadersAvailable = false; System.out.println("GL_ARB_shader_objects extension not available"); } if (extensions.indexOf("GL_EXT_geometry_shader4") == -1) { geoShadersAvailable = false; System.out.println("GL_ARB_geometry_shader4 extension not available"); } if (extensions.indexOf("GL_ARB_vertex_shader") == -1) { vertShadersAvailable = false; System.out.println("GL_ARB_vertex_shader extension not available"); } if (extensions.indexOf("GL_ARB_fragment_shader") == -1) { fragShadersAvailable = false; System.out.println("GL_ARB_fragment_shader extension not available"); } if (extensions.indexOf("GL_ARB_shading_language_100") == -1) { glsl100Available = false; System.out.println("GL_ARB_shading_language_100 extension not available"); } if (extensions.indexOf("GL_ARB_texture_float") == -1) { floatTexAvailable = false; System.out.println("GL_ARB_texture_float extension not available"); } if (extensions.indexOf("GL_ARB_texture_non_power_of_two") == -1) { nonTwoPowTexAvailable = false; System.out.println("GL_ARB_texture_non_power_of_two extension not available"); } if (extensions.indexOf("GL_EXT_framebuffer_multisample") == -1) { fboMultisampleAvailable = false; System.out.println("GL_EXT_framebuffer_multisample extension not available"); } }
protected void getVersionNumbers() { glVersion = gl.glGetString(GL.GL_VERSION); glMajor = Character.getNumericValue(glVersion.charAt(0)); glMinor = Character.getNumericValue(glVersion.charAt(2)); glslVersion = gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION_ARB); }