// testovany box
box = new Box("box", Vector3f.ZERO, 10, 10, 10);
// texture state se dvemi texturami
TextureState ts = display.getRenderer().createTextureState();
Texture t01 = TextureManager.loadTexture(getClass().getResource("/textures/pattern/rgb.bmp"), Texture.MinificationFilter.Trilinear, Texture.MagnificationFilter.Bilinear, 1.0f, true);
Texture t02 = TextureManager.loadTexture(getClass().getResource("/textures/pattern/mask.bmp"), Texture.MinificationFilter.Trilinear, Texture.MagnificationFilter.Bilinear, 1.0f, true);
//jak se ty dve textury smichaji
t01.setApply(ApplyMode.Combine);
t02.setApply(ApplyMode.Combine);
// jen na zkousku pootacim jednu z textur
t01.setRotation(new Quaternion(new float[]{0.1f,0.5f,0.5f}));
t01.setWrap(WrapMode.Repeat);
//kdyz ma t01 a t02 ApplyMode combine, tak se da dale kombinovat za pomoci dalsiho milionu kombinaci
/*t01.setCombineFuncRGB(CombinerFunctionRGB.Modulate);
t01.setCombineSrc0RGB(CombinerSource.CurrentTexture);
t01.setCombineOp0RGB(CombinerOperandRGB.SourceColor);
t01.setCombineSrc1RGB(CombinerSource.PrimaryColor);
t01.setCombineOp1RGB(CombinerOperandRGB.SourceColor);
t01.setCombineScaleRGB(CombinerScale.One);
t02.setCombineFuncRGB(CombinerFunctionRGB.AddSigned);
t02.setCombineSrc0RGB(CombinerSource.CurrentTexture);
t02.setCombineOp0RGB(CombinerOperandRGB.SourceColor);
t02.setCombineSrc1RGB(CombinerSource.Previous);
t02.setCombineOp1RGB(CombinerOperandRGB.SourceColor);
t02.setCombineScaleRGB(CombinerScale.One);*/
// prirazeni do jednotlivych "slotu" texture state
ts.setTexture(t01, 0);
ts.setTexture(t02, 1);
// !dulezite. Texture state pripravuje koordinaty pouze pro "slot" 0. Takze je potreba prokopirovat do slotu 1
box.copyTextureCoordinates(0, 1, 1f);
// prirazeni boxu
box.setRenderState(ts);