Re: [PyOpenGL-Users] glMap2f() takes exactly 6 arguments (10 given)
Brought to you by:
mcfletch
From: Gary H. <gh...@is...> - 2008-05-25 15:31:23
|
Nick Shaforostoff wrote: > Hi. I'm learning NURBS. I get this error: > GL.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, ctrlpoints[0][0][0]) > TypeError: glMap2f() takes exactly 6 arguments (10 given) > > though documentation says glMap2f has 10 params and all code snippets found on the internet pass 10 params too. > According to the PyOpenGL manual: C Specification void glMap2d ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); void glMap2f ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); Python Specification glMap2d ( target, u1, u2, v1, v2, points[][][]) → None glMap2f ( target, u1, u2, v1, v2, points[][][]) → None The C calls take 10 parameters, but the Python versions take far fewer. Instead of passing in a pointer and some stride and order information describing how it is organized as an array, Python just accepts the array Gary Herron > ii python-opengl 3.0.0~b1-2 Python bindings to OpenGL > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |