You can use all extensions from OpenGL
1.2/1.3/1.4/1.5
2.0/2.1
3.0/3.1/3.2/3.3
4.0/4.1/4.2/4.3/4.4
I can't post it here (more than 5,000 lines of code) right click save as "glextensions.bi"
download: glextensions.bi
All extensions are defined as shared GLboolean's.
if IS_GL_ARB_imaging=GL_TRUE then ...
if IS_GL_VERSION_2_0=GL_FALSE then
' no shader fixed render pipeline only
else
' use your funky shader stuff
endif
Joshy
Code: Select all
#include once "glextensions.bi"
#include "fbgfx.bi"
#if __FB_LANG__ = "fb"
using FB
#endif
screenres 640,480,32,,GFX_OPENGL
flip
if InitGLExtensions()=GL_FALSE then
screen 0
print "error: no active OpenGL context !"
endif
if IS_GL_VERSION_1_2 then
' ...
endif
if IS_GL_VERSION_1_3 then
' use multi textures (glActiveTexture ...)
endif
if IS_GL_VERSION_1_4 then
' ...
endif
if IS_GL_VERSION_1_5 then
' use all VBO stuff
else
' use glArray stuff instead
endif
if IS_GL_VERSION_2_0 then
' use GLSL stuff
else
' no shader fixed pipeline only
endif
if IS_GL_VERSION_2_1 then
' ...
endif
if IS_GL_VERSION_3_0 then
' ...
endif
if IS_GL_VERSION_3_1 then
' ...
endif
if IS_GL_VERSION_3_2 then
' ...
endif
if IS_GL_VERSION_3_3 then
' ...
endif
if IS_GL_VERSION_4_0 then
' ...
endif
if IS_GL_VERSION_4_1 then
' ...
endif
if IS_GL_VERSION_4_2 then
' ...
endif
if IS_GL_VERSION_4_3 then
' ...
endif
if IS_GL_VERSION_4_4 then
' ...
endif
dim as single r,s=0.01
while inkey()=""
glClearColor(r,0,0,1)
glClear(GL_COLOR_BUFFER_BIT)
r+=s
if r<0 then
r=0:s*=-1
elseif r>1 then
r=1:s*=-1
endif
flip
sleep 1
wend