Right, while trying to set up a test case I think I understood what was wrong. I don't know if I am not using the API correctly of if there is an issue with it.
I have three objects in my world
- A plane
- A landing strip
- A control tower
On every frame, I draw the plane, then translate/rotate the landing strip and the control tower. On the first frame you cannot see either of these, but you can see the plane.
The camera is always looking at (0,0,0), where my plane is, and where my airport is at the beginning, when the models are loaded.
I setup the camera this way to always see the plane from behind:
final Camera cam = world.getCamera();
final SimpleVector pos = new SimpleVector();
pos.set(plane.getTransformedCenter());
pos.y = -2;
pos.z = 10;
cam.setPosition(pos);
cam.setFOV(60f);
cam.lookAt(plane.getTransformedCenter());
When I do it like this, after flying around with the plane, when the airport comes visible, it is not textured. When I place the camera on the original position of the airport however (which is the same as the model is at (0,0,0) when the stuff is initialised), it appears textured.
final Camera cam = world.getCamera();
final SimpleVector pos = new SimpleVector();
pos.set(strip.getTransformedCenter());
pos.y = -2;
pos.z = 10;
cam.setPosition(pos);
cam.setFOV(60f);
cam.lookAt(strip.getTransformedCenter());
I suppose this is something to do with lazy texturing - do not texture something that is not visible. In this case however, either I am not using the API correcly (should I reset the camera on every frame?) or there is an issue when those become visible.
I hope I was clear - this was a bit tricky to explain.
Thx
Tishu