[PyOpenGL-Users] Is glMap1f() broken or am I?
Brought to you by:
mcfletch
From: Rich D. <dr...@in...> - 2004-04-09 15:45:28
|
The 2D (surface) NURBS demos seem to work OK, but when I try to code a simple line BSPLINE based on C demos I've found, this section of code: ctrlpoints=[[-4.0, -4.0, 0.0], [-2.0, 4.0, 0.0], [2.0, -4.0, 0.0], [4.0, 4.0, 0.0]] glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, ctrlpoints) # no stride or order in pygl seems to fail with this error: Traceback (most recent call last): File "./netplot.py", line 158, in on_display self.drawsyn() File "./netplot.py", line 72, in drawsyn glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, ctrlpoints) # no stride or order in pygl OpenGL.GL.GLerror: [Errno 1281] invalid value Since the docs weren't clear on how to format ctrlpoints as far as I could find, I have also tried changing the format of ctrlpoints to this: ctrlpoints=[-4.0, -4.0, 0.0, -2.0, 4.0, 0.0, 2.0, -4.0, 0.0, 4.0, 4.0, 0.0] I think the answer lies with ctrlpoints but I'm at a loss for now. Any ideas? Searching the archive, I notice somebody asked about getting a BSPLINE type line working a while back. The answer he got was that the 2D demos work . . . true enough, but maybe there is something else going on. Thanks, Rich |