[visionegg] Re: Error on FC7 and glColorf. SOLVED

I'm guessing there's going to be more of these errors with PyOpenGL 3.
PyOpenGL 1 and 2 were "hand wrapped" to be more pythonic whereas pyopengl 3 is automatically wrapped from ctypes (which supposedly is slightly slower).

It looks like pyopengl 3 removed all of the pythonic version of glVertex and glColor (and probably the rest of the *3f *3v, such that they have to be replaced with the proper call for the proper length of array.
http://pyopengl.sourceforge.net/ctypes/pydoc/OpenGL.GL.html

A quick grep finds these modules have calls to glColorf :
Core.py
Dots.py
GLTrace.py
Gratings.py
MoreStimuli.py
SphereMap.py
Text.py
Textures.py
Do these all work with python 2.5 and pyopengl 3?

Mark

On Apr 16, 2007, at 3:09 PM, Andrew Straw wrote:

Mark van Rossum wrote:
On Monday 16 Apr 2007 19:43:21 Andrew Straw wrote:

Hi Mark,

I haven't had the chance yet to try VE with PyOpenGL 3. I suspect some
aspect of the upgrade from PyOpenGL 2 to 3 is the issue. In the
meantime, is it possible for you to downgrade to PyOpenGL 2?


Already fixed:

in line 424 of VisionEgg/Gratings.py use
gl.glColor4f(p.color1[0],p.color1[1],p.color1[2],p.max_alpha)

OK, thanks for the report. Looks like this used to work in PyOpenGL 2
but no longer... Anyhow, I've fixed it in svn.
I know not enough of Python to know whether this is an implementation but of
python, or a new syntax.


With a name of "van Rossum" I would've thought Python knowledge would be
hereditary! :)

-Andrew
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: