Re: [PyOpenGL-Users] [SOLVED] glDrawArrays and PyOpenGL 3.0.0a6 anything changed?
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2007-10-08 17:10:34
|
V. Armando Sole wrote: ... > The following code was working fine on PyOpenGL 2.0.1.09: > > GL.glVertexPointerf(self.vertices) > GL.glColorPointerf(self.vertexColors) > GL.glEnableClientState(GL.GL_VERTEX_ARRAY) > GL.glEnableClientState(GL.GL_COLOR_ARRAY) > GL.glDrawArrays(GL.GL_POINTS, 0, xsize*ysize) > ... > Just changing glColorPointerf(self.vertexColors) by > glColorPointerd(self.vertexColors) solved my problem. > Okay, that's weird. I've just written a test like so (against current CVS): def test_numpyConversion( self ): """Test that we can run a numpy conversion from double to float for glColorArray""" import numpy a = numpy.arange( 0,1.2, .1, 'd' ).reshape( (-1,3 )) glEnableClientState(GL_VERTEX_ARRAY) glColorPointerf( a ) glColorPointerd( a ) and it produced no errors. Can you produce a minimal test that shows the error occurring? The system *should* be able to convert from double to float (as shown with this test). Could be that it's some bug I don't recall fixing, but that doesn't seem likely. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |