Hi,

So, first of all - apologies for the lack of incrementation in my last message, 
was horrible to read - new webmail systems seem to forget about plain text 
limitations...

I figured out a workaround by not creating any GL_ARRAY_BUFFER but working 
directly with the original data array (represented by a bgl.Buffer) in the 
bgl.glVertexAttribPointer function.

I don't know yet what this means in terms of performance compared to the 
buffered version, will have to benchmark.

So for now the showstopper is solved and I am able to continue working on my 
project.

*But* still in current bgl implementation there's a whole family of functions 
which do not completely offer matching possibilities with their C counterparts:

glBitmap
glColorPointer
glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D
glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage3D
glDrawPixels
glEdgeFlagPointer
glGetPointerv
glGetVertexAttribPointerv
glIndexPointer
glNormalPointer
glPolygonStipple
glReadPixels
glTexCoordPointer
glTexImage1D
glTexImage2D
glTexImage3D
glTexSubImage1D
glTexSubImage2D
glTexSubImage3D
glVertexAttribPointer
glVertexPointer

(Note that 1) I could have forgotten some and 2) there could be more OpenGL 
functions concerned but that are currently not wrapped in bgl.)

All those functions share the particularity that, in case of non-0 buffer bound 
in some place - typically GL_ARRAY_BUFFER, GL_PIXEL_UNPACK_BUFFER, etc. - the 
meaning of their pointer argument changes from an absolute pointer to an offset 
pointer (you can search for text "is treated as a byte offset into the buffer 
object's data store" on site www.opengl.org/sdk/docs/man2/xhtml).

Currently, bgl only supports the "absolute pointer" functionality, because of 
it's lack of translating integer offsets rather than buffers/arrays.

This is probably something that could be addressed. For now on I will rather 
continue working with what already does the job for me (provided that 
performance stays equivalently good). If I've got some time later I will look 
further into this.

Thanks,
Quentin Wenger
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to