|
Cogs.Core
|
Renderer interface used by the engine to control registered renderer instances. More...
#include <IRenderer.h>
Public Member Functions | |
| virtual | ~IRenderer ()=default |
| Provided for destruction via pointer to base. | |
| virtual void | initialize (IGraphicsDevice *device)=0 |
| virtual void | cleanup ()=0 |
| Cleanup the renderer, releasing all resources held. | |
| virtual glm::vec2 | getSize () const =0 |
| Get the output surface size of the renderer. | |
| virtual IGraphicsDevice * | getDevice ()=0 |
| Get the graphics device used by the renderer. | |
| virtual void | setMode (RenderMode mode)=0 |
| Set the rendering mode the renderer should use. | |
| virtual RenderMode | getMode () const =0 |
| Get the Rendering mode used by the renderer. | |
| virtual void | setBackgroundColor (const glm::vec4 &color)=0 |
| Set the background color applied to the output surface before rendering. | |
| virtual glm::vec4 | getBackgroundColor () const =0 |
| Get the reference to the background color. | |
| virtual void | beginFrame ()=0 |
| Signals the beginning of a new frame. | |
| virtual void | endFrame (uint32_t syncInterval=0, Cogs::PresentFlags presentFlags=Cogs::PresentFlags::None)=0 |
| Signals the end of the current frame. | |
| virtual void | render ()=0 |
| Kick off the actual rendering, allowing the renderer to produce its output. | |
| virtual glm::mat4 | getProjectionMatrix (const glm::mat4 projectionMatrix)=0 |
| Get an adjusted projection matrix used to render. | |
| virtual glm::mat4 | getViewFromViewportMatrix (const glm::mat4 inverseProjectionMatrix)=0 |
| Get an adjusted inverse projection matrix mainly used in post processing. | |
| virtual float | getClearDepth ()=0 |
| Get adjusted clear depth used to render. | |
| virtual float | getNearDepth ()=0 |
| Get adjusted near plane depth. | |
| virtual IRenderResources * | getResources ()=0 |
| Get the render resources interface. | |
| virtual const RenderSettings & | getSettings () const =0 |
| Get the settings of the renderer. | |
| virtual void | registerExtension (IRendererExtension *extension)=0 |
| Register an extension with the renderer. | |
| virtual void | unregisterExtension (IRendererExtension *extension)=0 |
| Unregister an extension with the renderer. | |
| virtual std::span< IRendererExtension * > | getExtensions ()=0 |
| Get the list of all extensions. | |
| virtual void | renderScreenshot (const ScreenshotSettings &settings, std::vector< uint8_t > &bytes, uint32_t *stride)=0 |
| Render screenshot. | |
| virtual unsigned | getMaxLights () const =0 |
| Get the maximum number of lights. | |
| virtual EngineBuffers & | getEngineBuffers ()=0 |
| Get the reference to the EngineBuffers structure. | |
| virtual RenderStates & | getRenderStates ()=0 |
| Get the reference to the RenderStates structure. | |
| virtual EffectCache & | getEffectCache ()=0 |
| Get the reference to the EffectCache structure. | |
| virtual EffectFlags::EEffectFlags | getEffectFlags () const =0 |
| Get the EffectFlags. | |
| virtual EffectBindings & | getEffectBindings ()=0 |
| Get the reference to the EffectBindings structure. | |
| virtual ActiveLights & | getActiveLights ()=0 |
| Get the reference to the ActiveLights structure. | |
| virtual void | updatePermutation (EnginePermutation *permutation)=0 |
| Updates the EnginePermutation. | |
| virtual EnginePermutations & | getEnginePermutations ()=0 |
| Get the reference to the EnginePermutations structure. | |
| virtual COGSCORE_DLL_API class ImguiRenderer * | getGuiRenderer ()=0 |
| virtual COGSCORE_DLL_API class InspectorGuiRenderer * | getEngineInspectorGuiRenderer ()=0 |
Renderer interface used by the engine to control registered renderer instances.
Any renderer to be used with the Engine must implement this interface.
Definition at line 153 of file IRenderer.h.
|
pure virtual |
Signals the beginning of a new frame.
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::Engine::update().
|
pure virtual |
Cleanup the renderer, releasing all resources held.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Signals the end of the current frame.
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::Engine::update().
|
pure virtual |
Get the reference to the ActiveLights structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the reference to the background color.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get adjusted clear depth used to render.
The depth value is accounting for device coordinate system differences.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the graphics device used by the renderer.
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::ShapeSystem::initialize(), and Cogs::Core::Image360System::update().
|
pure virtual |
Get the reference to the EffectBindings structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the reference to the EffectCache structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the EffectFlags.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the reference to the EngineBuffers structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the reference to the EnginePermutations structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the list of all extensions.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the maximum number of lights.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the Rendering mode used by the renderer.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get adjusted near plane depth.
The depth value is accounting for device coordinate system differences.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get an adjusted projection matrix used to render.
The matrix is accounting for device coordinate system differences.
| projectionMatrix | GL-convention projection matrix used as base for the conversion. |
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::LightSystem::preRender(), and Cogs::Core::CameraSystem::updateProjection().
|
pure virtual |
Get the reference to the RenderStates structure.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the render resources interface.
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::CameraSystem::postRender().
|
pure virtual |
Get the settings of the renderer.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Get the output surface size of the renderer.
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::Engine::update(), and Cogs::Core::GuiSystem::update().
|
pure virtual |
Get an adjusted inverse projection matrix mainly used in post processing.
The matrix is accounting for how depth values are converted from clip space to viewport coordinates.
| inverseProjectionMatrix | inverse of the actual projection matrix used for rendering. |
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::CameraSystem::updateProjection().
|
pure virtual |
Register an extension with the renderer.
| extension | Pointer to a class implementing the IRendererExtension interface. |
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::Image360System::createComponent(), Cogs::Core::EditorExtension::initialize(), Cogs::Core::GuiExtension::initialize(), Cogs::Core::PotreeSystem::initialize(), Cogs::Core::SeaCurrentsSystem::initialize(), Cogs::Core::TerrainSystem::initialize(), Cogs::Core::VectorField::VectorFieldSystem::initialize(), Cogs::Core::VideoCaptureSystem::initialize(), and Cogs::Core::Volumetric::OctSystem::initialize().
|
pure virtual |
Kick off the actual rendering, allowing the renderer to produce its output.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Render screenshot.
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Set the background color applied to the output surface before rendering.
| color | A four-component RGBA color to clear the surface to. |
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Set the rendering mode the renderer should use.
| mode | Rendering mode to use. |
Implemented in Cogs::Core::Renderer.
|
pure virtual |
Unregister an extension with the renderer.
| extension | Pointer to a class implementing the IRendererExtension interface. |
Implemented in Cogs::Core::Renderer.
Referenced by Cogs::Core::EditorExtension::cleanup(), Cogs::Core::PotreeSystem::cleanup(), Cogs::Core::SeaCurrentsSystem::cleanup(), Cogs::Core::TerrainSystem::cleanup(), Cogs::Core::VideoCaptureSystem::cleanup(), and Cogs::Core::Image360System::destroyComponent().
|
pure virtual |
Updates the EnginePermutation.
| permutation | EnginePermutation to update. |
Implemented in Cogs::Core::Renderer.