No available texture after installation

Hi everybody!

I had a big problem with Panda after the installation on my GNU/Linux Debian Unstable and Ubuntu Hoary, the textures had disappeared!! :open_mouth:

Yes, the textures in ALL samples and models, DISAPPEARED!
I tried a lot of thing to fix it. Because on other Debian Unstable this problem didn’t occour. I tried to resolve it for many hours, but nothing!

I tried again and again…and again and…YEAH!! I discovered the problem!

So, why this occur? :question:

The problem was in LANG environment variable! My LANG variable was set with pt_BR.UTF-8 and when i unset this variable, all samples e models appear with their the appropriate textures. If this variable will be set with en_US.UTF-8, the problem don’t occur.

But, i don’t know where is the problem, in Python or Panda?
But this is my solution for other people who come to have my problem.

My Regards

P.S. Sorry for my poor english! :blush:

Amazing! It’s hard to imagine how the LANG variable could have affected texture loads, but I’ve seen stranger things happen.

Were there any error messages (like “GL unable to create texture context” or “could not find texture file”) when you tried to load textures and they failed, or did it just quietly come up without textures?

If you loaded a model in pview and pressed shift-L to view the hierarchy, did it list “Texture” on the ends of some of the GeomNodes, or did it not?

David

OpenGL errors don’t appear. But, there are assertion error when i try load models/panda. This is the error:

Assertion failed: (*vmi).second.almost_equal(LCAST(float, offset), 0.001) at line 197 of panda/src/egg2pg/computedVerticesMaker.cxx

Now, when i using pview models/panda, the messages are:

with LANG=pt_BR.UTF-8
PandaNode models
ModelRoot panda.egg
Character panda_soft
GeomNode (19 geoms: CullFaceAttrib TextureAttrib)

with LANG=en_US.UTF-8
PandaNode models
ModelRoot panda.egg
Character panda_soft
GeomNode (19 geoms: CullFaceAttrib TextureAttrib TransparencyAttrib)

Note: The polygons appears so strange, i.e., completely deformed.

I wait that it helps.

Djalma

I’m the same guy that post the message below! I forgot log in! :laughing:

I figured it out. The problem is that setting the LANG variable changes the behavior of atof() and related functions, by changing the decimal point character, so that atof(“1.5”) no longer returns 1.5, but now returns 1! This confuses the egg loader, the Config.prc parser, and all sorts of subtle parts of Panda that want to parse numbers that are encoded with an English decimal point.

I’ve put in a fix that will be released with a future version of Panda, but in the meantime, another workaround (instead of setting your LANG variable to “en_US.UTF-8”) will be to leave your LANG variable set where you like it, but set the variable LC_NUMERIC to “C”–this tells the system that you want to get all of the language properties except for the numeric decoding, for which you want to use the “C” decoding (which is the same as the English convention).

Please let me know if this workaround seems to work for you, since that relates to the fix that I have put in.

David

Yes, this workaround works very well!

Thanks.

Djalma