This time, we are going to change our quad to see the effect of the new material:
Change the used material to
MyMaterial8
and also change the texture coordinates from 2 to 0.2:manual->begin("MyMaterial8", RenderOperation::OT_TRIANGLE_LIST); manual->position(5.0, 0.0, 0.0); manual->textureCoord(0.0,0.2); manual->position(-5.0, 10.0, 0.0); manual->textureCoord(0.2,0.0); manual->position(-5.0, 0.0, 0.0); manual->textureCoord(0.2,0.2); manual->position(5.0, 10.0, 0.0); manual->textureCoord(0.0,0.0);
Now create the new material
MyMaterial8
in the material file. This time, we don't need any texture mode; just use the textureterr_rock6.jpg:
material MyMaterial8 { technique { pass { texture_unit { texture terr_rock6.jpg } } } }
Compile and run the application. You should see a part of the stone texture that we had seen before.