FrameData¶
Frame data structure.
Overview¶
Typical use cases:
Holding frame-specific data for rendering
Header¶
<RaeptorCogs/GAPI/Common/Core/Internal/FrameData.hpp>
Metadata¶
- Author
Estorc
- Version
v1.0
- Copyright
Copyright (c) 2025 Estorc MIT License.
Types¶
Type |
Description |
|---|---|
|
Type alias for uniform data. |
|
Type alias for uniform hash map. |
-
using RaeptorCogs::GAPI::Common::UniformData = std::variant<bool, int, unsigned int, float, glm::vec2, glm::vec3, glm::vec4, glm::mat2, glm::mat3, glm::mat4>¶
Type alias for uniform data.
Holds the possible types for uniform variables.
-
using RaeptorCogs::GAPI::Common::UniformHashMap = std::unordered_map<std::string, UniformData>¶
Type alias for uniform hash map.
Maps uniform names to their corresponding data.
Structs¶
Struct |
Description |
|---|---|
|
Frame data structure. |
-
struct FrameData¶
Frame data structure.
Holds data relevant to the current frame being rendered.
Public Functions
Public Members
-
double width¶
Frame width.
Holds the width of the current frame.
-
double height¶
Frame height.
Holds the height of the current frame.
-
UniformHashMap uniforms = {{"uTime", 0.0f}, {"uViewMatrix", glm::mat4(1.0f)}, {"uProjectionMatrix", glm::mat4(1.0f)},}¶
Uniforms for the frame.
Holds a map of uniform names to their corresponding data.
-
glm::mat4 &viewMatrix = std::get<glm::mat4>(uniforms["uViewMatrix"])¶
Reference to the view matrix uniform.
-
glm::mat4 &projectionMatrix = std::get<glm::mat4>(uniforms["uProjectionMatrix"])¶
Reference to the projection matrix uniform.
-
ObjectHandler<Common::Shader> activeShader¶
Active shader.
Holds the currently active shader for the frame.
-
double width¶