|
CeresEngine 0.2.0
A game development framework
|
The CeresEngine renderer. More...
#include <CeresEngine/Renderer/Renderer.hpp>
Public Member Functions | |
| Renderer (GPUDevice &device, ResourceManager &resourceManager) | |
| Creates a new renderer instance that uses the given render API device. | |
| ~Renderer () | |
| Destroys the renderer. | |
| void | render () |
| Renders all cameras in all registered scenes. | |
| void | render (const RendererView &view) |
| Renders a single view. | |
| SPtr< RendererMaterial > | findMaterial (const HMaterial &material) |
| Finds a renderer material for a material resource. | |
| RendererShaderPtr | getShader (StringView name) |
| Finds a shader by name. | |
| RendererShaderPtr | getOldShader (StringView name) |
| Finds a shader by name. | |
| RendererScene & | createScene () |
| Registers a new scene entity with the renderer. | |
| GPUDevice & | getDevice () const noexcept |
| The device the renderer will render to. | |
| ResourceManager & | getResourceManager () const noexcept |
| The resource manager to load renderer resources from. | |
| const RendererSettings & | getSettings () const noexcept |
| Global settings for the renderer. | |
| void | setSettings (const RendererSettings &rendererSettings) |
| Global settings for the renderer. | |
| RendererSceneManager & | getSceneManager () const noexcept |
The renderer scene manager that is responsible for taking a Scene entity and all manage all it's child entities that are supported by the renderer. | |
| RendererCameraManager & | getCameraManager () const noexcept |
The renderer mesh manager that is responsible for tracking active Camera entities and maintain a consistent view with RendererCamera. | |
| RendererLightManager & | getLightManager () const noexcept |
The renderer mesh manager that is responsible for tracking active Light entities and maintain a consistent view with RendererLight. | |
| RendererRenderableManager & | getRenderableManager () const noexcept |
The renderer mesh manager that is responsible for tracking active Renderable entities and maintain a consistent view with RendererRenderable. | |
| RendererTerrainManager & | getTerrainManager () const noexcept |
The renderer mesh manager that is responsible for tracking active Terrain entities and maintain a consistent view with RendererTerrain. | |
| RendererEnvironmentManager & | getEnvironmentManager () const noexcept |
The renderer mesh manager that is responsible for tracking active Environment entities and maintain a consistent view with RendererEnvironment. | |
| RendererMeshManager & | getMeshManager () const noexcept |
| The renderer mesh manager that is responsible for taking a in-engine mesh, convert and upload it to the GPU. | |
| RendererTextureManager & | getTextureManager () const noexcept |
| The renderer texture manager that is responsible for taking a in-engine image, convert and upload it to the GPU. | |
| RendererMaterialManager & | getMaterialManager () const noexcept |
| The renderer material manager that is responsible for taking a material resource and make it usable by the renderer on the GPU. | |
| RendererShaderManager & | getShaderManager () const noexcept |
| The renderer shader manager that is responsible for managing and re-using GPU shaders. | |
| RendererGraphicsPipelineManager & | getGraphicsPipelineManager () const noexcept |
| The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines. | |
| RendererComputePipelineManager & | getComputePipelineManager () const noexcept |
| The renderer compute pipeline manager that is responsible for managing and re-using GPU compute pipelines. | |
| ShadowRenderer & | getShadowRenderer () const noexcept |
| A renderer that is responsible for drawing shadow maps for lights. | |
| Matrix4 | getClipMatrix () const |
| Returns the clip matrix for the renderer. | |
| const GPUImagePtr & | getNullTexture () const |
| A null cube texture image to be used when one is not necessary. | |
| const GPUImagePtr & | getNullCubeTexture () const |
| A null cube texture image to be used when one is not necessary. | |
| const GPUImagePtr & | getBRDF () const |
| The pre-baked BRDF texture. | |
| const GPUPipelineLayoutPtr & | getBindlessPipelineLayout () const noexcept |
| The bindless pipeline layout. | |
| RendererMaterial & | getDefaultMaterial () const |
| bool | isBindlessSupported () const noexcept |
| Checks if bindless rendering is supported by the device. | |
| RendererShaderPtr | getBasePass () |
| Gets the base pass shader. | |
Private Member Functions | |
| GPUImagePtr | generateBRDF (GPUCommandBuffer &commandBuffer) |
| Generates the BRDF texture. | |
Private Attributes | |
| GPUDevice & | mDevice |
| The device the renderer will render to. | |
| ResourceManager & | mResourceManager |
| The resource manager to load renderer resources from. | |
| UPtr< RendererMeshManager > | mMeshManager |
| The renderer mesh manager that is responsible for taking a in-engine mesh, convert and upload it to the GPU. | |
| UPtr< RendererTextureManager > | mTextureManager |
| The renderer texture manager that is responsible for taking a in-engine image, convert and upload it to the GPU. | |
| UPtr< RendererShaderManager > | mShaderManager |
| The renderer shader manager that is responsible for managing and re-using GPU shaders. | |
| UPtr< RendererGraphicsPipelineManager > | mGraphicsPipelineManager |
| The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines. | |
| UPtr< RendererComputePipelineManager > | mComputePipelineManager |
| The renderer compute pipeline manager that is responsible for managing and re-using GPU compute pipelines. | |
| UPtr< RendererMaterialManager > | mMaterialManager |
| The renderer material manager that is responsible for taking a material resource and make it usable by the renderer on the GPU. | |
| UPtr< RendererSceneManager > | mSceneManager |
The renderer scene manager that is responsible for taking a Scene entity and all manage all it's child entities that are supported by the renderer. | |
| UPtr< RendererCameraManager > | mCameraManager |
The renderer mesh manager that is responsible for tracking active Camera entities and maintain a consistent view with RendererCamera. | |
| UPtr< RendererLightManager > | mLightManager |
The renderer mesh manager that is responsible for tracking active Light entities and maintain a consistent view with RendererLight. | |
| UPtr< RendererRenderableManager > | mRenderableManager |
The renderer mesh manager that is responsible for tracking active Renderable entities and maintain a consistent view with RendererRenderable. | |
| UPtr< RendererTerrainManager > | mTerrainManager |
The renderer mesh manager that is responsible for tracking active Terrain entities and maintain a consistent view with RendererTerrain. | |
| UPtr< RendererEnvironmentManager > | mEnvironmentManager |
The renderer mesh manager that is responsible for tracking active Environment entities and maintain a consistent view with RendererEnvironment. | |
| UPtr< ShadowRenderer > | mShadowRenderer |
| A renderer that is responsible for drawing shadow maps for lights. | |
| RendererSettings | mSettings |
| Global settings for the renderer. | |
| HashMap< UInt64, RendererShaderPtr > | mShaders |
| A cache of loaded shaders. Indexed by their shader name hash. | |
| GPUImagePtr | mNullCubeTexture |
| A null cube texture image to be used when one is not necessary. | |
| GPUImagePtr | mNullTexture |
| A null cube texture image to be used when one is not necessary. | |
| GPUImagePtr | mBRDF |
| The pre-baked BRDF texture. | |
| GPUPipelineLayoutPtr | mBindlessPipelineLayout |
| The bindless pipeline layout. | |
The CeresEngine renderer.
Takes a in-engine Scene object and renders it into texture in the GPU.
|
explicit |
Creates a new renderer instance that uses the given render API device.
| device | The device the renderer will render to. Presentation will be done to this device. |
| resourceManager | The resource manager to load renderer resources from. Resources such as builtin textures, shaders and meshes will be loaded from this manager. |
| CeresEngine::Renderer::~Renderer | ( | ) |
Destroys the renderer.
| RendererScene & CeresEngine::Renderer::createScene | ( | ) |
Registers a new scene entity with the renderer.
| scene | The scene to be added to the renderer. |
| SPtr< RendererMaterial > CeresEngine::Renderer::findMaterial | ( | const HMaterial & | material | ) |
Finds a renderer material for a material resource.
|
private |
Generates the BRDF texture.
This generation is somewhat expensive and the results should be cached as much as possible.
| RendererShaderPtr CeresEngine::Renderer::getBasePass | ( | ) |
Gets the base pass shader.
|
inlinenoexcept |
The bindless pipeline layout.
Used by systems to allocate shared resource sets for bindless rendering.
|
inline |
The pre-baked BRDF texture.
|
inlinenoexcept |
The renderer mesh manager that is responsible for tracking active Camera entities and maintain a consistent view with RendererCamera.
| Matrix4 CeresEngine::Renderer::getClipMatrix | ( | ) | const |
Returns the clip matrix for the renderer.
|
inlinenoexcept |
The renderer compute pipeline manager that is responsible for managing and re-using GPU compute pipelines.
| RendererMaterial & CeresEngine::Renderer::getDefaultMaterial | ( | ) | const |
|
inlinenoexcept |
The device the renderer will render to.
Presentation will be done to this device.
|
inlinenoexcept |
The renderer mesh manager that is responsible for tracking active Environment entities and maintain a consistent view with RendererEnvironment.
|
inlinenoexcept |
The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines.
|
inlinenoexcept |
The renderer mesh manager that is responsible for tracking active Light entities and maintain a consistent view with RendererLight.
|
inlinenoexcept |
The renderer material manager that is responsible for taking a material resource and make it usable by the renderer on the GPU.
|
inlinenoexcept |
The renderer mesh manager that is responsible for taking a in-engine mesh, convert and upload it to the GPU.
|
inline |
A null cube texture image to be used when one is not necessary.
|
inline |
A null cube texture image to be used when one is not necessary.
| RendererShaderPtr CeresEngine::Renderer::getOldShader | ( | StringView | name | ) |
Finds a shader by name.
| name | The name of the shader to load. |
|
inlinenoexcept |
The renderer mesh manager that is responsible for tracking active Renderable entities and maintain a consistent view with RendererRenderable.
|
inlinenoexcept |
The resource manager to load renderer resources from.
|
inlinenoexcept |
The renderer scene manager that is responsible for taking a Scene entity and all manage all it's child entities that are supported by the renderer.
|
inlinenoexcept |
Global settings for the renderer.
Controls global behavior of the renderer.
| RendererShaderPtr CeresEngine::Renderer::getShader | ( | StringView | name | ) |
Finds a shader by name.
| name | The name of the shader to load. |
|
inlinenoexcept |
The renderer shader manager that is responsible for managing and re-using GPU shaders.
|
inlinenoexcept |
A renderer that is responsible for drawing shadow maps for lights.
|
inlinenoexcept |
The renderer mesh manager that is responsible for tracking active Terrain entities and maintain a consistent view with RendererTerrain.
|
inlinenoexcept |
The renderer texture manager that is responsible for taking a in-engine image, convert and upload it to the GPU.
|
inlinenoexcept |
Checks if bindless rendering is supported by the device.
| void CeresEngine::Renderer::render | ( | ) |
Renders all cameras in all registered scenes.
| void CeresEngine::Renderer::render | ( | const RendererView & | view | ) |
Renders a single view.
| view | The view to be rendered. |
| void CeresEngine::Renderer::setSettings | ( | const RendererSettings & | rendererSettings | ) |
Global settings for the renderer.
Controls global behavior of the renderer.
|
private |
The bindless pipeline layout.
Used by systems to allocate shared resource sets for bindless rendering.
|
private |
The pre-baked BRDF texture.
|
private |
The renderer mesh manager that is responsible for tracking active Camera entities and maintain a consistent view with RendererCamera.
|
private |
The renderer compute pipeline manager that is responsible for managing and re-using GPU compute pipelines.
|
private |
The device the renderer will render to.
Presentation will be done to this device.
|
private |
The renderer mesh manager that is responsible for tracking active Environment entities and maintain a consistent view with RendererEnvironment.
|
private |
The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines.
|
private |
The renderer mesh manager that is responsible for tracking active Light entities and maintain a consistent view with RendererLight.
|
private |
The renderer material manager that is responsible for taking a material resource and make it usable by the renderer on the GPU.
|
private |
The renderer mesh manager that is responsible for taking a in-engine mesh, convert and upload it to the GPU.
|
private |
A null cube texture image to be used when one is not necessary.
|
private |
A null cube texture image to be used when one is not necessary.
|
private |
The renderer mesh manager that is responsible for tracking active Renderable entities and maintain a consistent view with RendererRenderable.
|
private |
The resource manager to load renderer resources from.
|
private |
The renderer scene manager that is responsible for taking a Scene entity and all manage all it's child entities that are supported by the renderer.
|
private |
Global settings for the renderer.
Controls global behavior of the renderer.
|
private |
The renderer shader manager that is responsible for managing and re-using GPU shaders.
|
private |
A cache of loaded shaders. Indexed by their shader name hash.
|
private |
A renderer that is responsible for drawing shadow maps for lights.
|
private |
The renderer mesh manager that is responsible for tracking active Terrain entities and maintain a consistent view with RendererTerrain.
|
private |
The renderer texture manager that is responsible for taking a in-engine image, convert and upload it to the GPU.