O'Reilly logo

Ogre 3D 1.7 by Felix Kerger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required