Silly TextureState question

Well this is prolly just me not understanding the workings of jME but here I go anyway.

I like to create factories where everything is created for me. So thats what I am doing with my ships stuff. Ships are just a node. To texture my node I need to set a TextureState for the node. But how todo that without having the display?. Do I need to pass on display to my factories


No, DisplaySystem is actually follows the singleton pattern. So you do this:

TextureState ts = DisplaySystem.getDisplaySystem.getRenderer().createTextureState();

Thats how i do it too! :D


duh… so it does… thanks