Time for action — using static geometry

We are going to modify the code from the last example to make it render faster:

  1. Remove the print statement; we don't need it anymore.
  2. Now get back to the manual object and remove all position() function calls that would add a point we already have added. For each quad, this should be points 4 and 6. Here is the code after removing duplicate entries:
    manual->position(5.0, 0.0, 0.0); manual->textureCoord(1,1); manual->position(-5.0, 10.0, 0.0); manual->textureCoord(0,0); manual->position(-5.0, 0.0, 0.0); manual->textureCoord(0,1); manual->position(5.0, 10.0, 0.0); manual->textureCoord(1,0); manual->position(2.5, 0.0, 4.3); manual->textureCoord(1,1); manual->position(-2.5, 10.0, -4.3); manual->textureCoord(0,0); ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.