class virtual renderer :Renders stuff.object..end
The basic renderer is Application.camera_perspective_renderer, which
renders a scene graph (Scene.scene_node) from the perspective of a
given camera (Scene.camera).
Renderers can be layered using Application.overlay_renderer, like
having a 2d console or border on top of a 3d scene.
Multiple renderers can be used to paint different parts of the
screen, using Application.column_renderer. Four different
views (top, side, front, and 3d perspective) of a scene
could be implemented with this.
Application.ortho_pixel_renderer uses world-coordinates that
correspond with screen pixel coordinates, useful for traditional
2d graphics.
Implementation notes: Renderers render to
the opengl backbuffer, using ordinary opengl commands.
They shouldn't call SdlGl.swap_buffers, Gl.clear or anything.
Callers, like
display_singleton#render (Application.display_singleton_type.render),
may choose to clear the color and depth buffers before calling #render.
Set the renderer for the actual display
by calling display_singleton#set_renderer
(Application.display_singleton_type.set_renderer).
See:
Application.camera_perspective_rendererApplication.ortho_pixel_rendererApplication.overlay_rendererApplication.column_rendererApplication.display_singleton_type.set_rendererApplication.display_singleton_type.rendermethod virtual set_viewport : x:int -> y:int -> width:int -> height:int -> unitmethod virtual render : Scene.render_context -> unit