We will create two new materials and one new quad. We will also change how our quad is defined:
For this example, we need a quad that simply displays one texture. Change the quad definition to use only texture coordinates between 0 and 1 and remember to change the used material to
MyMaterial11
, which we will create soon:manual->begin("MyMaterial11", RenderOperation::OT_TRIANGLE_LIST); manual->position(5.0, 0.0, 0.0); manual->textureCoord(0.0,1.0); manual->position(-5.0, 10.0, 0.0); manual->textureCoord(1.0,0.0); manual->position(-5.0, 0.0, 0.0); manual->textureCoord(1.0,1.0); manual->position(5.0, 10.0, 0.0); manual->textureCoord(0.0,0.0); manual->index(0); manual->index(1); manual->index(2); manual->index(0); manual->index(3); manual->index(1); manual->end();
The new material will use the rock texture and use the attribute
rotate_anim
, which rotates the texture with the given speed. But the most...