Hello!
I'm writing a culling framework that removes and create nodes from a pool depending on how far these are from the player (to save memory, etc.).
When basic items are created like
Box b = new Box("A funny box", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));
they appear like a "what is the matrix" fan art:
Cool built-in feature, but adding the same box to the rootnode from within simpleInitGame() works nicely... Can find why :?
Please help n_n thanks!
basixs
March 15, 2008, 7:02pm
2
That looks like the default font texture (which is probably the last texture used) generally this comes from a missing texture (bad path etc.) I have found. If your not trying to texture the box try setting a default texture
Texture defTex = TextureState.getDefaultTexture().createSimpleClone();
defTex.setScale(new Vector3f(1, 1, 1));
defaultTextureState = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
defaultTextureState.setTexture(defTex);
just to see what happens.
You might be missing an updateRenderState() also
aeneas
March 15, 2008, 9:01pm
3
I get that usually when I forget to updateRenderState(). Do rootNode.updateRenderState().
Hey thanks, both of you
That was my mistake. Good to know! Thanks again!