Renderers
Mach::GL has 2 renderers: Renderer2D and Renderer3D. Both renderers are created the same as below:
Graphics::MACH_RENDERER_2D renderer2D = Graphics::Renderer2D::createRenderer();
Graphics::MACH_RENDERER_3D renderer3D = Graphics::Renderer3D::createRenderer();
Mach::GL renderers needs Objects or Planes submitted to it, once they are submitted they will be instantly rendered. Objects and Planes can be submitted individually or by submitting a list with: std:vector<Plane::MACH_PLANE>
or std::vector<Object::MACH_OBJECT>
.
However, the 3D renderer has more functions that is tailored to 3D applications:
sumbit(object, camera, renderDistance);
sumbit(objectList, camera, renderDistance);
These functions allow for objects to be culled from the render queue if the object is further away from the camera than the value specified in renderDistance.