[visionegg] Re: AttributeError: 'module' object has no attribute 'GL_CLAMP_TO_EDGE'

Hi Nick,

There's a bug in PyOpenGL which VisionEgg.Core attempts to workaround. The short of it is that you can do the following.

    # Do we have gl.GL_CLAMP_TO_EDGE ?
    try:
        gl.GL_CLAMP_TO_EDGE
    except AttributeError:
        # If OpenGL version >= 1.2, this should be defined
        # It seems to be a PyOpenGL bug that it's not.
        gl.GL_CLAMP_TO_EDGE = 0x812F

See http://cvs.sourceforge.net/viewcvs.py/visionegg/visionegg/src/Core.py?rev=1.163&view=markup for the more-error-checking version. (This code was simplified from the version there.)

Unfortunately, the careful stuff (actually checking for OpenGL versions and extensions) in VisionEgg.Core has to be done after OpenGL is initialized. So an alternative workaround this is simply to make sure you have an instance of VisionEgg.Core.Screen initialized -- this should be done automatically then.

Cheers!
Andrew

Nick Knouf wrote:

hi everybody,

i'm working on getting visionegg up and running with simple RSVP experiments but seem to have run into a snag.

Traceback (most recent call last):
File "test_rsvp.py", line 103, in ?
stimuli = create_textures_from_filelist(filelist, 4, 20)
File "test_rsvp.py", line 82, in create_textures_from_filelist
stimuli.append([TextureStimulus(texture = texture, size = texture.size, texture_min_filter = gl.GL_LINEAR) for texture in texture_list])
File "/Users/Shared/Library/Python/2.3/lib/python2.3/site-packages/ VisionEgg/Textures.py", line 1133, in __init__
self.parameters.texture_wrap_s = gl.GL_CLAMP_TO_EDGE
AttributeError: 'module' object has no attribute 'GL_CLAMP_TO_EDGE'


--
Andrew D. Straw  Post-doctoral scholar
,-.              Dickinson Lab
\_/              California Institute of Technology
8||}             Mailcode 138-78
/ \              Pasadena CA 91125, USA
`-^
                 email:  astraw@xxxxxxxxxxx
                 office: +1 626 395 4396

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

Other related posts: