VBOs & Textures

  • Re-examine the current approach to rendering and explore alternatives, including:
    • Vertex Arrays
    • Indexed Vertex Arrays
    • VBO
  • Introduction to Textures.
  • Loading textures from image files
  • Binding textures to surfaces

Objectives

  • Factor out the current Geometry class into an abstract base class and an ImmediateGeometry that encapsulates current functionality
    • Derive a new class - VaGeometry - which uses Vertex Arrays
    • Derive another class - ElementGeometry - which uses indexed Vertex Arrays
    • Derive a class from ElementGeometry called VboGeometry which employs Vertex Buffer Objects
  • Instrument all of these classes to track number of vertices rendered

Objectives

  • Incorporate image based textures onto the surface of some actors.
  • Using the Soil open source opengl imaging library:
    • Load images onto the faces of a cube
    • Define a sphere using OpenGL Quadrics - and map a planetary surface onto it such that it is not distorded
  • As an exercise, explore loading multiple images/textured onto a singe cube