glGenTextures fails in python 3

Fabien Castan <[email protected]> Thu, 26 Dec 2013 10:00:17 +0100
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAJQWia4k28bc=tfeakygr2k5y9xjmLeeK4NJ3CGtkCZgb7rUzA@mail.gmail.com>
Hi,

I'm trying to move from python 2.7 to python 3.3, but I have a problem with
PyOpenGL.
The call to "GL.glGenTextures(1)" fails in python 3.

Regards,
Fabien


=================================================================

$ ipython
*Python 2.7.5*+ (default, Sep 19 2013, 13:48:49)
Type "copyright", "credits" or "license" for more information.

In [1]: from OpenGL import GL

In [2]: GL.glGenTextures
Out[2]: OpenGL.lazywrapper.lazy( 'glGenTextures' )

In [3]: GL.glGenTextures(1)
Out[3]: 0L


=================================================================
$ ipython3
*Python 3.3.2*+ (default, Oct  9 2013, 14:50:09)
Type "copyright", "credits" or "license" for more information.

In [1]: from OpenGL import GL

In [2]: GL.glGenTextures
Out[2]: OpenGL.lazywrapper.lazy( 'glGenTextures' )

In [3]: GL.glGenTextures(1)
---------------------------------------------------------------------------
ArgumentError                             Traceback (most recent call last)
<ipython-input-3-60d83e33f6f1> in <module>()
----> 1 GL.glGenTextures(1)

/usr/local/lib/python3.3/dist-packages/OpenGL_accelerate/
latebind.cpython-33m.so in OpenGL_accelerate.latebind.Curry.__call__
(src/latebind.c:1123)()

/usr/local/lib/python3.3/dist-packages/OpenGL/GL/exceptional.py in
glGenTextures(baseFunction, count, textures)
    187         # do so, even though it would be easier not to bother.
    188         textures = constants.GLuint( 0 )
--> 189         baseFunction( count, textures)
    190         return textures.value
    191     else:

/usr/local/lib/python3.3/dist-packages/OpenGL_accelerate/
latebind.cpython-33m.so in OpenGL_accelerate.latebind.LateBind.__call__
(src/latebind.c:931)()

/usr/local/lib/python3.3/dist-packages/OpenGL_accelerate/
wrapper.cpython-33m.so in OpenGL_accelerate.wrapper.Wrapper.__call__
(src/wrapper.c:6014)()

/usr/local/lib/python3.3/dist-packages/OpenGL_accelerate/
wrapper.cpython-33m.so in OpenGL_accelerate.wrapper.Wrapper.__call__
(src/wrapper.c:5948)()

ArgumentError: ("argument 2: <class 'TypeError'>: No array-type handler for
type <class 'CArgObject'> (value: <cparam 'P' (0x7fb22779a250)>)
registered", (1, <cparam 'P' (0x7fb22779a250)>))



=================================================================

$ pip3 show PyOpenGL
---
Name: PyOpenGL
Version: 3.1.0a3
Location: /usr/local/lib/python3.3/dist-packages

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users