An object representing a single opaque mesh-material pair, to be rendered this frame.
More...
#include <render_stage.hpp>
|
| | OpaqueRenderUnit (std::shared_ptr< StaticMesh > meshHandle, std::shared_ptr< Material > materialHandle, glm::mat4 modelMatrix) |
| | Constructs a new Opaque Render Unit object.
|
| |
| bool | operator< (const OpaqueRenderUnit &other) const |
| | Compares this unit to another based on priority.
|
| |
|
void | setSortKey () |
| | Method responsible for actually computing this unit's sort key.
|
| |
|
|
std::uint32_t | mSortKey {} |
| | The computed sort key for this object.
|
| |
|
std::shared_ptr< StaticMesh > | mMeshHandle |
| | The mesh handle for this render unit.
|
| |
|
std::shared_ptr< Material > | mMaterialHandle |
| | The material handle for this render unit.
|
| |
|
glm::mat4 | mModelMatrix |
| | The model matrix to apply to this unit.
|
| |
An object representing a single opaque mesh-material pair, to be rendered this frame.
Its sort key is computed such that render priority looks like this:
Mesh > Material Texture > Material Everything Else
- Todo
- Maybe there's a better order for opaque queues? Investigate.
◆ OpaqueRenderUnit()
| ToyMaker::OpaqueRenderUnit::OpaqueRenderUnit |
( |
std::shared_ptr< StaticMesh > | meshHandle, |
|
|
std::shared_ptr< Material > | materialHandle, |
|
|
glm::mat4 | modelMatrix ) |
|
inline |
Constructs a new Opaque Render Unit object.
- Parameters
-
| meshHandle | Handle to the mesh associated with this unit. |
| materialHandle | Handle to the material associated with this unit. |
| modelMatrix | This object's model matrix. |
◆ operator<()
| bool ToyMaker::OpaqueRenderUnit::operator< |
( |
const OpaqueRenderUnit & | other | ) |
const |
|
inline |
Compares this unit to another based on priority.
- Parameters
-
| other | The unit this one is being compared to |
- Return values
-
| true | This unit has a lower sort key than the other. |
| false | This unit does not have a lower sort key than the other. |
The documentation for this struct was generated from the following file: