GL Specification with BMX please!!

BlitzMax Forums/BlitzMax OpenGL Programming/GL Specification with BMX please!!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi,

Here's a little example for determining GL version and whether or not ARB_multitexture is available.

BlitzMax cannot at present 'cross compile'. True, this would be really cool to get going, but it's also really hard to do!

Strict

bglCreateContext 640,480

glewInit

If GL_VERSION_1_1
	If GL_VERSION_1_2
		If GL_VERSION_1_3
			If GL_VERSION_1_4
				If GL_VERSION_1_5
					If GL_VERSION_2_0
						Print "GL 2.0"
					Else
						Print "GL 1.5"
					EndIf
				Else
					Print "GL 1.4"
				EndIf
			Else
				Print "GL 1.3"
			EndIf
		Else
			Print "GL 1.2"
		EndIf
	Else
		Print "GL 1.1"
	EndIf
Else
	Print "GL ?.?"
EndIf

If GL_ARB_multitexture
	Print "ARB_multitexture present!"
EndIf