Vertex Buffer Command

BlitzMax Forums/BlitzMax OpenGL Programming/Vertex Buffer Command

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.

I've not checked out VBOs yet, but I think Terrabits 3D Level Demo uses them (if supported), check this post:

http://www.blitzbasic.com/Community/posts.php?topic=41577

As for the code, GLuint is an Unsigned INT, in max just use an INT

At a guess, the code means something like this:

Local buffer:Int = 0
glGenBuffersARB(1, VarPtr(buffer)) 'Get a buffer name (name = a pointer)
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffer) 'Tell GL buffer is of type 'GL_ARRAY_BUFFER_ARB'
glBufferDataARB(GL_ARRAY_BUFFER_ARB, SizeOf(data), data, GL_STATIC_DRAW_ARB) 'Point the buffer to some data

If 'data' is a vertex array, I'm not sure if SizeOf(data) would need to be 'data.length' instead.

Tom