Time for action — using static geometry
We are going to modify the code from the last example to make it render faster:
- Remove the print statement; we don't need it anymore.
- 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 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.