-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Whilst building some example code which relies on sdl.mod/gl2sdlmax2d.mod I came across a problem with the definition of the GL_FALSE and GL_TRUE constants in opengl.mod.
As GL_TRUE and GL_FALSE are of GLboolean type, then they are essentialy 1 Byte sized which leads to compilation errors under BlitzMax NG as it declares them as default size type (Int) in the opengl.bmx file.
There are also inconsistencies in other places where True/False (BlitzMax type) is used instead of GL_TRUE/GL_FALSE and this also throws up the same error.
The error being: Argument #n is "Int" but declaration is "Byte"
Fix:
Change definition of lines 104 & 105 in pub.mod/opengl.mod/opengl.bmx
Const GL_TRUE=1
Const GL_FALSE=0
to...
Const GL_TRUE:Byte=1
Const GL_FALSE:Byte=0
Furthermore, any use of BlitzMax NG True/False under OpenGL use should be changed to GL_TRUE/GL_FALSE to prevent the same error.