The Renderer

Thus far, the focus has been on render loop logic and the flow of renderable objects down a pipeline. In addition to this there is an infrastructure for managing the various rendering resources. All resources can be considered to be part of the overall rendering database, with each resource having a logical construct which is exposed in the API. The main resources are:

  1. Geometry
  2. Shaders
  3. Textures
  4. Output Buffers (where to render into)
  5. Lights. Note here that lights are just shaders.
  6. States (GPU state)

As shown, for each logical construct, there are per draw API GPU specific resources which are managed by the ren­derer. Currently GPU resources can be managed for DirectX11 or OpenGL.

Figure 12

At various points in the pipeline resources may be instantiated and used as required. This unrestricted access to resources is reflected accordingly in the API.