[visionegg] Re: opengl issue

  • From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 13 Apr 2004 18:17:39 -0700


On Apr 13, 2004, at 12:50 PM, Jin Yi wrote:


i'm trying to use visionegg for displaying text screens.  i have this
working if i approach the python code as a script.

for better software engineering, i've started to modularize my code into
classes. when i do this, this weird error pops up:

AttributeError: 'module' object has no attribute 'GL_CLAMP_TO_EDGE'

The short answer:


Use the same hack as in VisionEgg.Core: gl.GL_CLAMP_TO_EDGE = 0x812F.

(Or, if it's possible, don't call the error-generating code until after you have an instance of Screen open -- VisionEgg.Core will do it for you, leaving your code hack-free.)

The long answer:

The current PyOpenGL is built for OpenGL 1.1 features. If I remember correctly, GL_CLAMP_TO_EDGE came up in version 1.2. A better PyOpenGL would be smarter about this kind of stuff, but for now, it's all we've got.

Cheers!
Andrew

Other related posts: