Models' Texture don't work when loading a model

Hello there!

Firstly I would like to introduce ourselves. We are a group of students, taking Computer Science studies in the Complutense University in Madrid, Spain. We are working in a project, called eAdventure3d, whose purpose is to provide an engine for educational 3d adventure games. The games are written in XML, looking more like a storyboard document than code, and for our 3D core JME was the right choice! That is why you will know about us very often, as it is the very first project using JME in which we are involved, and of course we'll get in troubles all the time!

Once we've been properly introduced, there goes our first cuestion:

We got a problem when loading models, using the converters provided by JME (jmex.model.converters). If we attempt to load models using a StandardGame as a main class everything is ok, but if we change StandardGame to BaseGame… things go quite weird! The model loads perfectly, no errors are reported. However, the textures don't work!! all the models are shown in white!!! As the code we developed to load models work in a StandardGame, it seems something has not been initialized correctly.

Any ideas?? Any help much appreciated, we've been struggling our minds with that for a couple of days.

Thank you very much.

The most likely cause is you forgot to call rootNode.updateRenderState(). Whenever you modify your scenegraph, you need to call appropriate update methods.

Ummm… no, I actually updateRenderState() is already called after that. Anyway, thank you very much for your help, any other ideas?

Without seeing the code it's just educated guessing… The general approach of solving problems like this is as follows.

Try using SimpleGame and building a simple test rig with just one model and nothing else. If it works, do the same rig with BaseGame, see if it breaks there. By analyzing the code path that is different between the SimpleGame and BaseGame you can figure out what you are missing.

Special cases: If the test doesn't work in SimpleGame, the problem is somewhere in your code within the testcase. If the test works in BaseGame, the problem is somewhere in the code of your main project.