struct new in Git master
#include <Magnum/Shaders/Flat.h>
FlatMaterialUniform Material uniform for flat shaders.
Describes material properties referenced from FlatDrawUniform::
Constructors, destructors, conversion operators
- FlatMaterialUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- FlatMaterialUniform(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
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 setAlphaMask(Float alphaMask) -> FlatMaterialUniform&
- Set the alphaMask field.
- auto setColor(const Color4& color) -> FlatMaterialUniform&
- Set the color field.
Function documentation
FlatMaterialUniform& Magnum:: Shaders:: FlatMaterialUniform:: setAlphaMask(Float alphaMask)
Set the alphaMask field.
Returns | Reference to self (for method chaining) |
---|
FlatMaterialUniform& Magnum:: Shaders:: FlatMaterialUniform:: setColor(const Color4& color)
Set the color field.
Returns | Reference to self (for method chaining) |
---|
Variable documentation
Color4 Magnum:: Shaders:: FlatMaterialUniform:: color
Color.
Default value is 0xffffffff_rgbaf
.
If FlatGL::
Float Magnum:: Shaders:: FlatMaterialUniform:: alphaMask
Alpha mask value.
Fragments with alpha values smaller than the mask value will be discarded. Default value is 0.5f
.
Used only if FlatGL::