Magnum::Shaders::PhongGL::Configuration class new in Git master

Configuration.

Public functions

auto flags() const -> Flags
Flags.
auto setFlags(Flags flags) -> Configuration&
Set flags.
auto lightCount() const -> UnsignedInt
Light count.
auto setLightCount(UnsignedInt count) -> Configuration&
Set light count.
auto materialCount() const -> UnsignedInt
Material count.
auto setMaterialCount(UnsignedInt materialCount) -> Configuration&
Set material count.
auto drawCount() const -> UnsignedInt
Draw count.
auto setDrawCount(UnsignedInt drawCount) -> Configuration&
Set draw count.

Function documentation

Configuration& Magnum::Shaders::PhongGL::Configuration::setFlags(Flags flags)

Set flags.

No flags are set by default.

Configuration& Magnum::Shaders::PhongGL::Configuration::setLightCount(UnsignedInt count)

Set light count.

If Flag::UniformBuffers is set, describes size of a PhongLightUniform buffer bound with bindLightBuffer(); as uniform buffers are required to have a statically defined size. The per-draw lights are then specified via PhongDrawUniform::lightOffset and PhongDrawUniform::lightCount.

If Flag::UniformBuffers isn't set, describes how many lights get applied to each draw, and corresponds to the range / array size accepted by setLightPosition() / setLightPositions(), setLightColor() / setLightColors(), setLightSpecularColor() / setLightSpecularColors() and setLightRange() / setLightRanges().

Can be set to 0, in which case only the ambient contribution to the color is used. Default value is 1.

Configuration& Magnum::Shaders::PhongGL::Configuration::setMaterialCount(UnsignedInt materialCount)

Set material count.

If Flag::UniformBuffers is set, describes size of a PhongMaterialUniform buffer bound with bindMaterialBuffer(); as uniform buffers are required to have a statically defined size. The per-draw materials are then specified via PhongDrawUniform::materialId. Default value is 1.

If Flag::UniformBuffers isn't set, this value is ignored.

Configuration& Magnum::Shaders::PhongGL::Configuration::setDrawCount(UnsignedInt drawCount)

Set draw count.

If Flag::UniformBuffers is set, describes size of a ProjectionUniform3D / TransformationUniform3D / PhongDrawUniform / TextureTransformationUniform buffer bound with bindProjectionBuffer(), bindTransformationBuffer(), bindDrawBuffer() and bindTextureTransformationBuffer(); as uniform buffers are required to have a statically defined size. The draw offset is then set via setDrawOffset(). Default value is 1.

If Flag::UniformBuffers isn't set, this value is ignored.