A manager class that creates, manages and handles GPU vertex and index buffers for meshes used by the renderer.
More...
#include <CeresEngine/Renderer/Resources/RendererMesh.hpp>
A manager class that creates, manages and handles GPU vertex and index buffers for meshes used by the renderer.
◆ RendererMeshManager()
| CeresEngine::RendererMeshManager::RendererMeshManager |
( |
Renderer & |
renderer, |
|
|
GPUDevice & |
device |
|
) |
| |
|
explicit |
◆ ~RendererMeshManager()
| CeresEngine::RendererMeshManager::~RendererMeshManager |
( |
| ) |
|
◆ create()
Creates a new renderer mesh instance for the given engine mesh.
◆ get()
Gets a renderer mesh object.
The renderer mesh is a renderer usable representation of a mesh resource. This mesh begins in the pending state but will eventually be uploaded to GPU and be usable by renderables and other objects in the renderer scene.
If a renderer mesh object for the given mesh resource already exists, the existing instance is returned to the user. If no existing instance is found, a new one is created and returned to the user.
- Parameters
-
| mesh | The mesh resource to get or create a new renderer mesh for. |
◆ getIndexBuffer()
Tries to locate a IndexBuffer for the given mesh.
If no such buffer exists, the manager might schedule an asynchronous upload of data to the GPU and return once the index buffer becomes available.
- Parameters
-
| mesh | The mesh to return a GPU index buffer resource for. |
- Returns
- A GPU
IndexBuffer for the mesh. If no such buffer exists, the manager might return nullptr until the GPU data upload is complete.
◆ getOrCreate()
Gets an existing or creates a new renderer mesh instance for the given engine mesh.
◆ getVertexBuffer()
Tries to locate a VertexBuffer for the given mesh.
If no such buffer exists, the manager might schedule an asynchronous upload of data to the GPU and return once the vertex buffer becomes available.
- Parameters
-
| mesh | The mesh to return a GPU vertex buffer resource for. |
- Returns
- A GPU
VertexBuffer for the mesh. If no such buffer exists, the manager might return nullptr until the GPU data upload is complete.
◆ notifyDestroy()
Notifies the manager that the renderer mesh is being destroyed.
◆ RendererMesh
◆ mDevice
| GPUDevice& CeresEngine::RendererMeshManager::mDevice |
|
private |
The device to which the meshes will be uploaded to.
◆ mMeshes
A map that holds mesh information for each engine mesh used by the renderer.
◆ mRenderer
| Renderer& CeresEngine::RendererMeshManager::mRenderer |
|
private |
The renderer that owns this manager instance.
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Renderer/Resources/RendererMesh.hpp