GL error 1281

while playing around with texture projection i’ve encountered a gl error that crashes panda. maybe it’s of use to make it more crash resistant:

os: ubuntu 9.04 32, panda 1.6.2

from pandac.PandaModules import *
from import Actor

from direct.directbase import DirectStart


ripple = Actor('ripple.egg')

for i in xrange(8):
  proj = render.attachNewNode(LensNode('proj'))
  lens = PerspectiveLens()
  proj.setPos(i*0.1, -2,0) #i*0.1+1.5, -2.3, 2.9)
  proj.setHpr(22, -15, 0)
  tex = loader.loadTexture('maps/4map.rgb')
  ts = TextureStage('ts')
  ripple.projectTexture(ts, tex, proj)


Known issue with TexGen and auto-shader in 1.6.2.

The thread kind of petered out, so not sure if Pro-rsoft has given any more thought about this. (It’s kind of a pretty major issue.)

Now bugified:

good to know, thanks :slight_smile:

If this is absolutely a show stopper for you, there is a patch I included, but it’s kinda really kludgey and isn’t guaranteed to work on all platforms.

Also, because the TexGenAttrib changes, it will cause your shader to be automatically re-generated every frame. There needs to be a better way to deal with this, and unfortunately it’s another rather large hairy issue. You can read more:

It’s a pretty big mess here.

no it’s not a problem at all, i just played around a bit when i encountered this error. it’s great if it’s a known problem and it’s been looked into.

FenrirWolf: are you sure you’re talking about the same issue? That involved a segfault, not a GL error, am I right?
But for the record, I’ve checked a fix to that issue to CVS.

Hypnos: I can’t reproduce your issue in latest CVS version of Panda. Maybe it has been resolved already.

this is the error output:

Known pipe types:
(all display modules loaded.)
AL lib: alcConfig.c:244: Reading ~/.openalrc; this file is deprecated
	Please rename it to ~/.alsoftrc
AL lib: alcConfig.c:146: config parse error: option without a value: "(define"
AL lib: alcConfig.c:146: config parse error: option without a value: "(define"
:Actor: model contains 1 animations.
:pgraph(error): Shader Generator does not support TexMatrix yet.
:pgraph(error): Shader Generator does not support TexGen yet.
:display:gsg:glgsg(error): at 3031 of panda/src/glstuff/glGraphicsStateGuardian_src.cxx : GL error 1281
Segmentation fault

the error only happens if you take the object into view.

Oh, you’re still running 1.6.x. Most likely it has already been fixed (in 1.7, the SG also supports TexGen and TexMatrix.)