Re: Problem with setting strides on vertex buffer
"Mike C. Fletcher" <[email protected]> Wed, 11 Feb 2015 09:36:39 -0500
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net