GL error 1281 [SOLVED]

It’s my first post in a while, since I’ve gotten better at solving my own problems, but I’ve just run into one that’s a real humdinger.

I’m loading a model from an egg that I created from an obj using TreeForm’s The model displays fine, with it’s texture in place and everything, but when it’s loaded the command window spits out a bunch of iterations of the following error:

:display:gsg:glgsg(error): at 4115 of c:\p\panda3d-1.5.4\panda\src\glstuff\glGraphicsStateGuardian_src.cxx : GL error 1281

after the many repetitions of that error, it says:

:display(error): Deactivating wglGraphicsStateGuardian

I’ve looked over the egg file for any broken references or anything of that nature, but I couldn’t find any problems. If it matters, my scene is lit by directional lights.

I should also mention that this does cause a significant problem. A single frame is rendered that looks fine, but it won’t render anymore frames and if I minimize the window and bring it back up again, the window no longer contains the frame it rendered, and is just black. (I set the background color to black)

Any idea what might be causing these errors to be spit out? I could always convert a maya scene instead of an OBJ to get around the problem, but I’d rather know the real cause. It seems to me that openGL is being turned off as a result of the errors, which is the cause of the major problem.

Line 4115 is in do_issue_material(), which tells me there’s something suspect about this model’s material settings.

Inspect the egg file for entries and look for anything suspect. Try commenting out suspicious lines in the egg file until the problem goes away, to narrow down the source of the problem.


I don’t see anything that seems suspect to me. This is the only material entry in the egg:

<Material> Default_mat {
  <Scalar> diffr { 0.784314 }
  <Scalar> diffg { 0.784314 }
  <Scalar> diffb { 0.784314 }
  <Scalar> ambr { 0 }
  <Scalar> ambg { 0 }
  <Scalar> ambb { 0 }
  <Scalar> specr { 0 }
  <Scalar> specg { 0 }
  <Scalar> specb { 0 }
  <Scalar> shininess { 400 }

And all the Mref tags look like this:

<MRef> { Default_mat }

shininess is only defined up to 128. So a shininess value of 400 is an error.


Aha, okay. Thanks.