struct new in Git master
#include <Magnum/Shaders/Line.h>
LineDrawUniform Per-draw uniform for line shaders.
Together with the generic TransformationProjectionUniform2D / TransformationProjectionUniform3D contains parameters that are specific to each draw call. Material-related properties are expected to be shared among multiple draw calls and thus are provided in a separate LineMaterialUniform structure, referenced by materialId.
Constructors, destructors, conversion operators
- LineDrawUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- LineDrawUniform(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- UnsignedShort materialId
- Material ID.
- UnsignedInt objectId
- Object ID.
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 setMaterialId(UnsignedInt id) -> LineDrawUniform&
- Set the materialId field.
- auto setObjectId(UnsignedInt id) -> LineDrawUniform&
- Set the objectId field.
Function documentation
LineDrawUniform& Magnum:: Shaders:: LineDrawUniform:: setMaterialId(UnsignedInt id)
Set the materialId field.
Returns | Reference to self (for method chaining) |
---|
LineDrawUniform& Magnum:: Shaders:: LineDrawUniform:: setObjectId(UnsignedInt id)
Set the objectId field.
Returns | Reference to self (for method chaining) |
---|
Variable documentation
UnsignedShort Magnum:: Shaders:: LineDrawUniform:: materialId
Material ID.
References a particular material from a LineMaterialUniform array. Useful when an UBO with more than one material is supplied or in a multi-draw scenario. Should be less than the material count passed to LineGL::1
, this field is assumed to be 0
and isn't even read by the shader. Default value is 0
, meaning the first material gets used.
UnsignedInt Magnum:: Shaders:: LineDrawUniform:: objectId
Object ID.
Used only for the object ID framebuffer output, not to access any other uniform data. Default value is 0
.
Used only if LineGL::