This time, we are going to change our quad to see the effect of the new material:
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);
MyMaterial8
in the material file. This time, we don't need any texture mode; just use the texture terr_rock6.jpg:
material MyMaterial8 { technique { pass { texture_unit { texture terr_rock6.jpg } } } }
We are only seeing a part of the texture because our quad only has a texture coordinate that is going up to 0.2; this means four-fifths of the texture isn't rendered onto our quad. Everything that has happened in this Time for action — should be easy to understand, as it's just a repetition of the stuff we learned in this chapter up until now. If necessary, read the chapter again.
3.135.212.238