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

Hello,

Well Andrew beat me to the explanation too after all!

That said, you should definitely not issue OpenGL calls before setting up an OpenGL context. This is easily accomplished by creating an instance of VisionEgg.Core.Screen like Andrew said.

Just to clear things up, simply using:
# 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
should not work in your case since your textures will normally not be created without an OpenGL context active. When you display this, you will get a blank texture instead of what you wanted.


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

Other related posts: