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