Top: Contents
- A central object in Fermat is the RenderingContext, a class encapsulating all there is to know about a scene's to render, including:
- the camera,
- the framebuffer,
- the scene database, including lights, geometry and textures,
- the ray tracing context,
- some precomputed tables to help with material simulation and such,
- the actual renderer,
- We'll now go through this list step by step.
- The camera with which to render the current scene is specified by:
- The framebuffer and its attributes are specified by:
- The mesh geometry is specified by:
- The light sources are specified by:
uint32 RenderingContext::get_directional_lights_count() const
- and:
- Notice that this is a host-side class holding the device-side storage needed to sample mesh emitters on the device. Its view is just a MeshLight, i.e. a class with the Light interface.
- The ray tracing context is specified by:
- Finally, Fermat allows plugins to register new renderers with the following call:
uint32 register_renderer(const char* name, RendererFactoryFunction factory)
The factory is just a fuction/method returning a pointer to a new RendererInterface object:
Next: The Renderer Interface