|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Container for a cubemap mesh stored on the GPU. More...
#include <GREM/graphics_3d/Cubemap3D.hpp>
Classes | |
| struct | Vertex |
| Data layout for the attributes of a single vertex of a cubemap mesh. More... | |
| struct | VertexShaderConstants |
| Struct of default vertex shader constants. More... | |
| struct | VertexShaderOutputs |
| Struct of fields output by the default vertex shader. More... | |
| struct | FragmentShaderOutputs |
| Struct of fields output by the default fragment shader. More... | |
| struct | PerspectiveParameters |
| Struct of shader parameters representing the perspective viewing the cubemap. More... | |
Public Types | |
| using | Index = uint16_t |
| Data type used in the index buffer of a cubemap mesh. | |
| using | Mesh = graphics::Mesh<Vertex, Index> |
| Cubemap mesh primitive type. | |
| using | PerspectiveBuffer = UniformBuffer<PerspectiveParameters, "Cubemap3DPerspective"> |
| Shader buffer for cubemap perspective parameters. | |
| using | VertexShader = graphics::VertexShader<Mesh, VertexShaderConstants, VertexShaderOutputs, PerspectiveBuffer> |
| Default vertex shader for drawing cubemaps. | |
| using | ShaderPipeline = graphics::ShaderPipeline<Mesh> |
| Shader pipeline for drawing cubemaps. | |
Public Member Functions | |
| Cubemap3D (Device &device) | |
| Construct a unit cubemap. | |
| const Mesh & | getMesh () const noexcept |
| Get the cubemap mesh. | |
Static Public Member Functions | |
| static Array< mat4, 6 > | getSideViewMatrices (vec3 position) noexcept |
| Get an array of view matrices for rendering each side of an axis-aligned cubemap from its center at a specific position. | |
Static Public Attributes | |
| static constexpr VertexShaderConstants | DEFAULT_VERTEX_SHADER_CONSTANTS {} |
| Default cubemap vertex shader constants. | |
| static constexpr ShaderPipelineOptions | DEFAULT_SHADER_PIPELINE_OPTIONS |
| Default cubemap graphics pipeline configuration. | |
| static constexpr mat4 | SIDE_PROJECTION_MATRIX |
| Projection matrix for rendering a side of a cubemap from its center. | |
| static constexpr Array | SIDE_FORWARD_DIRECTIONS |
| Camera forward directions for rendering each side of an axis-aligned cubemap. | |
| static constexpr Array | SIDE_UP_DIRECTIONS |
| Camera up vectors for rendering each side of an axis-algined cubemap. | |
Container for a cubemap mesh stored on the GPU.
| using grem::graphics::Cubemap3D::Index = uint16_t |
Data type used in the index buffer of a cubemap mesh.
Cubemap mesh primitive type.
| using grem::graphics::Cubemap3D::PerspectiveBuffer = UniformBuffer<PerspectiveParameters, "Cubemap3DPerspective"> |
Shader buffer for cubemap perspective parameters.
| using grem::graphics::Cubemap3D::VertexShader = graphics::VertexShader<Mesh, VertexShaderConstants, VertexShaderOutputs, PerspectiveBuffer> |
Default vertex shader for drawing cubemaps.
Shader pipeline for drawing cubemaps.
|
inlineexplicit |
Construct a unit cubemap.
| device | device to create the cubemap for. Must outlive the cubemap. |
| graphics::Error | on failure to create the cubemap. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
inlinestaticnodiscardnoexcept |
Get an array of view matrices for rendering each side of an axis-aligned cubemap from its center at a specific position.
| position | center of the cubemap. |
|
inlinenodiscardnoexcept |
Get the cubemap mesh.
|
staticconstexpr |
Default cubemap vertex shader constants.
|
staticconstexpr |
Default cubemap graphics pipeline configuration.
|
staticconstexpr |
Projection matrix for rendering a side of a cubemap from its center.
|
staticconstexpr |
|
staticconstexpr |