Saturday, April 14, 2007

Vertex Arrays

Vertex and Index Arrays have been added to the Decade Engine. The Brute Force Terrain is now rendered using a Vertex Array as a Triangle Strip.

Previously the Terrain was rendered in a nested loop, rendering X Triangle Strips, where X is the length of the terrain. Now when the terrain is created/loaded 1 Triangle Strip is created and loaded into a Vertex Array. At render time I simply ask OpenGL to render this Vertex Array. Sample source for Vertex Arrays can be found at here

Sadly this did not give me the frame rate increase I was hoping for. I will have to investigate if there is a reason for this, and I will also implement Vertex Buffer Objects. Despite the disappointing results the code is now allot more readable, allot more maintainable and the Terrain Object is API independent. I will easily be able reuse the Object as-is when I code my DirectX version of Decade. (if only things were ever that easy)



Many areas of the engine are still in development
  • CLOD Terrain Renders
  • Terrain Texture Generation
  • Terrain Lighting
  • Applying Vertex and Index Buffers to Mesh Renders

1 comment:

  1. Looking good! You're making good progress.

    Can't wait to see a game made with this...

    ReplyDelete