How do I get TextureState and MaterialState when using jme-jbullet?

Hai!

Im trying to change my game physic engine from jMEphysics to jme.jbullet

But I cant find how to create a texturestate nor material state because I got no display  :expressionless:

How do I do that?

When creating/using Texture/Materials, it should not matter what physic implementation you use.



Any States in general are created by accessing the Renderer which is a instance inside the DisplaySystem.

The DisplaySystem is a Singleton, which you can access from anywhere with:



Renderer rend = DisplaySystem.getDisplaySystem().getRenderer() ;
MaterialState matState = rend.createMaterialState();



Because of how the DisplaySystem is built, it only works from inside the OpenGL thread. (only matters if you use StandardGame or multiple threads in general)
see GameTaskQueue in the wiki.

Ahh thanks alot  :smiley: