Re: [PyOpenGL-Users] VBO Problem
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2009-03-17 04:59:24
|
Ian Mallett wrote: > Hi, > > I've been trying a long time to get VBOs working with PyOpenGL. The > VBOs appear to be created correctly, but I don't see anything at all > on the screen (I have other objects onscreen too not drawn with VBOs > just to make sure). > > I'm creating the VBOs like so (vbo_formatted_vertices is a NumPy array > of the vertices all lumped into one array (not separated into separate > 3-item lists)): Sorry I haven't time tonight to look into what's going on in your code, but here are 4 pieces of sample code that all use VBOs to draw with PyOpenGL... http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/annotate/head%3A/tests//shader_1.py http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/annotate/head%3A/tests//shader_2.py http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/annotate/head%3A/tests//shader_3.py http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/annotate/head%3A/tests//shader_4.py which may help you pinpoint what's not working. The 4th example shows usage in almost-legacy-free form (other than the model-view matrix), the arrays passed to the VBO are "interleaved" style vertex arrays. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |