Checking for OpenGL Extensions using Glew
BlitzMax Forums/BlitzMax Programming/Checking for OpenGL Extensions using Glew
| ||
Does somebody know how I, *USING GLEW* (*not by getting the extentions string*), check if an OpenGL extention is available? This http://glew.sourceforge.net/basic.html suggests, that there are globals I can check. For example, how do I see if Glew loaded glActiveTextureARB ? Thanks in advance. |
| ||
Anybody? BLR perhaps? In addition: How do I see what version of Glew Bmax is using? |
| ||
Like this:Import pub.glew SetGraphicsDriver GLMax2DDriver() Graphics 640,480,0,0 glewInit() If (GL_ARB_vertex_program) Print "Yepa!" EndIf If (GL_VERSION_1_1) Print "GLEW_VERSION_1_1" EndIf If (GL_VERSION_1_2) Print "GLEW_VERSION_1_2" EndIf If (GL_VERSION_1_3) Print "GLEW_VERSION_1_3" EndIf If (GL_VERSION_1_4) Print "GLEW_VERSION_1_4" EndIf If (GL_VERSION_1_5) Print "GLEW_VERSION_1_5" EndIf If (GL_VERSION_2_0) Print "GLEW_VERSION_2_0" EndIfJust replace the GLEW with GL Added GLEW_VERSION_X_X check... |
| ||
Thanks fredborg! There does not seem to be a global for glActiveTextureARB , so I think the right way is: (added gl_1.4 to 2.0 ) glewInit() ' required for glActiveTextureARB If (GL_VERSION_1_3 | GL_VERSION_1_3 | GL_VERSION_1_4 | GL_VERSION_1_5 | GL_VERSION_2_0) Notify "OpenGL 1.3 or better present" multitexturePresent = True ElseIf (GL_ARB_multitexture) multitexturePresent = True Notify "GL_ARB_multitexture OK" Else Notify "GL_ARB_multitexture MISSING!" EndIf |