struct new in Git master
#include <Magnum/Shaders/Generic.h>
TransformationProjectionUniform2D Combined 2D projection and transformation uniform common for all shaders.
Used by FlatGL, MeshVisualizerGL2D, DistanceFieldVectorGL, VectorGL and VertexColorGL that don't need to have a separate projection matrix supplied.
Constructors, destructors, conversion operators
- TransformationProjectionUniform2D(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- TransformationProjectionUniform2D(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- Matrix3x4 transformationProjectionMatrix
- Transformation and projection matrix.
Convenience setters
Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.
- auto setTransformationProjectionMatrix(const Matrix3& matrix) -> TransformationProjectionUniform2D&
- Set the transformationProjectionMatrix field.
Function documentation
TransformationProjectionUniform2D& Magnum:: Shaders:: TransformationProjectionUniform2D:: setTransformationProjectionMatrix(const Matrix3& matrix)
Set the transformationProjectionMatrix field.
Returns | Reference to self (for method chaining) |
---|
The matrix is expanded to Matrix3x4, with the bottom row being zeros.
Variable documentation
Matrix3x4 Magnum:: Shaders:: TransformationProjectionUniform2D:: transformationProjectionMatrix
Transformation and projection matrix.
Default value is an identity matrix. The bottom row is unused and acts only as a padding to match uniform buffer packing rules.
If FlatGL::