Time for action — preparing our quad

We are going to use the quad from the previous example with the leaf texture material:

  1. Change the texture coordinates of the quad from range 0 to 1 to 0 to 2. The quad code should then look like this:
    manual->position(5.0, 0.0, 0.0);
    manual->textureCoord(0,2);
    manual->position(-5.0, 10.0, 0.0);
    manual->textureCoord(2,0);
    manual->position(-5.0, 0.0, 0.0);
    manual->textureCoord(2,2);
    manual->position(5.0, 10.0, 0.0);
    manual->textureCoord(0,0);
    
  2. Now compile and run the application. Just as before, we will see a quad with a leaf texture, but this time we will see the texture four times.
    Time for action — preparing our quad

What just happened?

We simply changed ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.