Re: [PyOpenGL-Users] glVertexAttribPointer(); loading platform-specific functions
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2009-08-13 18:54:35
|
Ian Mallett wrote: > On Thu, Aug 13, 2009 at 7:38 AM, Paulo Silva <nit...@gm... > <mailto:nit...@gm...>> wrote: > > > vertexBufferObject = vbo.VBO(...) > > gl.glVertexAttribPointer(positionLocation, 3, GL_FLOAT, False, 24, > > vertexBufferObject) > > > > The second line generates this error: > > > > ctypes.ArgumentError: argument 6: <type 'exceptions.TypeError'>: > > Don't know how to convert parameter 6 > > You might try this code, adapted from my code, which makes use of > vertex attributes for normal mapping: > > vertex_attrib_vbo.bind() > glVertexAttribPointer(location,4,GL_FLOAT,GL_FALSE,0,None) Yup, that should work, even with the raw ctypes APIs. > The last argument could probably also be 0. 0 would be interpreted as a 1-element array of integers. You can (with a bug-fix introduced for 3.0.1) do ctypes.c_void_p( 0 ) if you want to, though. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |