Breaking Blitzmax

BlitzMax Forums/BlitzMax OpenGL Programming/Breaking Blitzmax

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.

Dont know why but this code:
glEnableClientState(GL_VERTEX_ARRAY)	
glGenBuffersARB(1, Varptr(obj_ptr.vert))
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj_ptr.vert)
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sglfloat*Sizeof(obj_ptr.shape_verts), obj_ptr.shape_verts, GL_STATIC_DRAW_ARB)

glGenBuffersARB(1, Varptr(obj_ptr.norm))
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj_ptr.norm)
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sglfloat*Sizeof(obj_ptr.shape_norms), obj_ptr.shape_norms, GL_STATIC_DRAW_ARB)

glGenBuffersARB(1, Varptr(obj_ptr.col))
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj_ptr.col)
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sglfloat*Sizeof(obj_ptr.shape_cols), obj_ptr.shape_cols, GL_STATIC_DRAW_ARB)

glGenBuffersARB(1, Varptr(obj_ptr.tex))
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj_ptr.tex)
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sglfloat*Sizeof(obj_ptr.shape_texs), obj_ptr.shape_texs, GL_STATIC_DRAW_ARB)
glDisableClientState(GL_VERTEX_ARRAY)

glEnableClientState(GL_ELEMENT_VERTEX_ARRAY)
glGenBuffersARB(1, Varptr(obj_ptr.ind))
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj_ptr.ind)
glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sglint*Sizeof(obj_ptr.shape_faces), obj_ptr.shape_faces, GL_STATIC_DRAW_ARB)
glDisableClientState(GL_ELEMENT_VERTEX_ARRAY)

.. breaks the 'bglDrawText' command ???

Although the code compiles and runs fine. If I comment it out I get the text back - otherwise its missing !.

Any ideas please ?