Re: [PyOpenGL-Users] Problem with setting strides on vertex buffer
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2015-02-11 14:55:10
|
On 15-02-10 12:32 PM, Henry Gomersall wrote: > Setting the last argument of glVertexAttribPointer (the pointer offset) > to anything other than None seems to cause the vertex buffer to not work > (at least, I don't seem to be able to render it - that's about as far as > I'm competent to debug). > > Using pyglet.gl seems to work fine, but PyOpenGL not so much. PyOpenGL will treat a bald number as an array of length 1 with that value as the value in the array. You need to pass a GL.GLvoidp( offset ) to get it to treat the value as an offset pointer. If you are using the VBO class, you can pass your_VBO + offset as well. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |