|
Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
|
The RenderState is owned by GraphRenderer. More...
#include <RenderState.hpp>
Classes | |
| class | ProgramLocal |
Representation of RenderState data per ShaderProgram as GLUniformData. More... | |
Public Member Functions | |
| RenderState (jau::math::util::PMVMat4f &pmvMat) | |
| Create a RenderState, a composition of RegionRenderer. | |
| constexpr int | aaQuality () const noexcept |
Returns pass2 AA-quality rendering value for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT. | |
| void | clearDebugBits (int mask) noexcept |
| void | clearHintBits (int bits) noexcept |
| jau::math::geom::Frustum * | clipFrustum () |
Returns the optional Mv-premultiplied clipping Frustum or nullptr if unused. | |
| constexpr int | debugBits () const noexcept |
| constexpr bool | debugBitsSet (int mask) const noexcept |
| void | destroy () |
Only nullifies ShaderProgram reference owned by RegionRenderer. | |
| void | disableFrustumClipping () noexcept |
| const jau::math::util::PMVMat4f & | getMatrix () const noexcept |
| jau::math::util::PMVMat4f & | getMatrix () noexcept |
| float | getWeight () |
| constexpr int | hintBits () const noexcept |
| constexpr bool | hintBitsSet (int bits) const noexcept |
| constexpr int | id () const noexcept |
| constexpr bool | isShaderProgramInUse () const noexcept |
Return whether the current ShaderProgram is in use. | |
| constexpr int | sampleCount () const noexcept |
Returns pass2 AA sample count for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT. | |
| int | setAAQuality (int v) |
Sets pass2 AA-quality rendering value clipped to the range [Region#MIN_AA_QUALITY..Region#MAX_AA_QUALITY] for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT. | |
| void | setDebugBits (int mask) noexcept |
| void | setFrustumClipping (const jau::math::geom::Frustum &clipFrustum) noexcept |
Set the optional clipping Frustum, which shall be pre-multiplied with the Mv-matrix or null to disable. | |
| void | setHintBits (int bits) noexcept |
| int | setSampleCount (int v) |
Sets pass2 AA sample count clipped to the range [Region#MIN_AA_SAMPLE_COUNT..Region#MAX_AA_SAMPLE_COUNT] for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT. | |
| bool | setShaderProgram (GL &gl, ShaderProgramRef &spNext) |
Sets the current ShaderProgram and enables it. | |
| void | setWeight (float v) |
| constexpr const ShaderProgramRef & | shaderProgram () const noexcept |
Return the current ShaderProgram. | |
| constexpr ShaderProgramRef & | shaderProgram () noexcept |
Return the current ShaderProgram. | |
| const jau::math::Vec4f & | staticColor () const noexcept |
| jau::math::Vec4f & | staticColor () noexcept |
| std::string | toString () |
| bool | updateAttributeLoc (GL &gl, bool updateLocation, GLArrayData &data, bool throwOnError) |
| bool | updateUniformDataLoc (GL &gl, bool updateLocation, bool updateData, GLUniformData &data, bool throwOnError) |
| bool | updateUniformLoc (GL &gl, bool updateLocation, GLUniformData &data, bool throwOnError) |
| constexpr bool | usesFrustumClipping () const noexcept |
| constexpr float | weight () const noexcept |
Static Public Member Functions | |
| static constexpr int | clipAAQuality (int v) |
| Returns clipped AA quality value to [MIN_AA_QUALITY..MAX_AA_QUALITY]. | |
| static constexpr int | clipAASampleCount (int v) |
| Returns clipped AA sample-count to [MIN_AA_SAMPLE_COUNT..MAX_AA_SAMPLE_COUNT]. | |
| static bool | isWeightValid (float v) |
Static Public Attributes | |
| static constexpr int | BITHINT_BLENDING_ENABLED = 1 << 0 |
Bitfield hint, if set stating enabled GL#GL_BLEND, otherwise disabled. | |
| static constexpr int | BITHINT_GLOBAL_DEPTH_TEST_ENABLED = 1 << 1 |
Bitfield hint, if set stating globally enabled GL#GL_DEPTH_TEST, otherwise disabled. | |
| static constexpr int | DEBUG_LINESTRIP = 1 << 0 |
| static constexpr int | DEFAULT_AA_QUALITY = MAX_AA_QUALITY |
| Default pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa. | |
| static constexpr int | DEFAULT_AA_SAMPLE_COUNT = 4 |
| Default pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa. | |
| static constexpr int | MAX_AA_QUALITY = 1 |
| Maximum pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa. | |
| static constexpr int | MAX_AA_SAMPLE_COUNT = 8 |
| Maximum pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa. | |
| static constexpr int | MIN_AA_QUALITY = 0 |
| Minimum pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa. | |
| static constexpr int | MIN_AA_SAMPLE_COUNT = 1 |
| Minimum pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa. | |
The RenderState is owned by GraphRenderer.
It holds rendering state data like jau::math::util::PMVMat4f, viewport, but also the current staticColor().
Definition at line 46 of file RenderState.hpp.
|
inline |
Create a RenderState, a composition of RegionRenderer.
| pmvMat | used PMVMatrix4f, could be shared |
Definition at line 207 of file RenderState.hpp.
|
inlinestaticconstexpr |
Returns clipped AA quality value to [MIN_AA_QUALITY..MAX_AA_QUALITY].
Definition at line 58 of file RenderState.hpp.
|
inlinestaticconstexpr |
Returns clipped AA sample-count to [MIN_AA_SAMPLE_COUNT..MAX_AA_SAMPLE_COUNT].
Definition at line 67 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 216 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Return the current ShaderProgram.
Definition at line 219 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Return the current ShaderProgram.
Definition at line 221 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Return whether the current ShaderProgram is in use.
Definition at line 224 of file RenderState.hpp.
|
inline |
Sets the current ShaderProgram and enables it.
If the given ShaderProgram is not the current, method returns true, otherwise false.
| gl | |
| spNext | the next current ShaderProgram to be set and enabled |
Definition at line 236 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 249 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 250 of file RenderState.hpp.
|
inlinestatic |
|
inline |
Definition at line 253 of file RenderState.hpp.
|
inline |
Definition at line 254 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 261 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 262 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 264 of file RenderState.hpp.
|
inline |
Sets pass2 AA-quality rendering value clipped to the range [Region#MIN_AA_QUALITY..Region#MAX_AA_QUALITY] for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT.
Definition at line 267 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Returns pass2 AA-quality rendering value for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT.
Definition at line 269 of file RenderState.hpp.
|
inline |
Sets pass2 AA sample count clipped to the range [Region#MIN_AA_SAMPLE_COUNT..Region#MAX_AA_SAMPLE_COUNT] for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT.
Definition at line 272 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Returns pass2 AA sample count for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT.
Definition at line 274 of file RenderState.hpp.
|
inlinenoexcept |
Set the optional clipping Frustum, which shall be pre-multiplied with the Mv-matrix or null to disable.
Definition at line 277 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 281 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 282 of file RenderState.hpp.
|
inline |
Returns the optional Mv-premultiplied clipping Frustum or nullptr if unused.
Definition at line 285 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 287 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 288 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 289 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 290 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 292 of file RenderState.hpp.
|
inlineconstexprnoexcept |
Definition at line 293 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 294 of file RenderState.hpp.
|
inlinenoexcept |
Definition at line 295 of file RenderState.hpp.
|
inline |
| gl | |
| updateLocation | |
| data | |
| throwOnError |
Definition at line 305 of file RenderState.hpp.
|
inline |
| gl | |
| updateLocation | |
| updateData | |
| data | |
| throwOnError |
Definition at line 327 of file RenderState.hpp.
|
inline |
| gl | |
| data | |
| throwOnError |
Definition at line 350 of file RenderState.hpp.
|
inline |
Only nullifies ShaderProgram reference owned by RegionRenderer.
Definition at line 366 of file RenderState.hpp.
|
inline |
Definition at line 370 of file RenderState.hpp.
|
staticconstexpr |
Minimum pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa.
Definition at line 52 of file RenderState.hpp.
|
staticconstexpr |
Maximum pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa.
Definition at line 54 of file RenderState.hpp.
|
staticconstexpr |
Default pass2 AA-quality rendering {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa.
Definition at line 56 of file RenderState.hpp.
|
staticconstexpr |
Minimum pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa.
Definition at line 61 of file RenderState.hpp.
|
staticconstexpr |
Maximum pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa.
Definition at line 63 of file RenderState.hpp.
|
staticconstexpr |
Default pass2 AA sample count {@value} for Graph Region AA GraphRegion::renderMode(): RenderMode::vbaa or RenderMode::msaa.
Definition at line 65 of file RenderState.hpp.
|
staticconstexpr |
Bitfield hint, if set stating enabled GL#GL_BLEND, otherwise disabled.
Shall be set via setHintBits(int) and cleared via clearHintBits(int).
If set, GLRegion's draw-method will set the proper blend-function and the clear-color to transparent-black in case of multipass FBO rendering.
Shall be set by custom code, e.g. via RegionRenderer's enable and disable RegionRenderer.GLCallback as done in RegionRenderer#defaultBlendEnable and RegionRenderer#defaultBlendDisable.
Definition at line 86 of file RenderState.hpp.
|
staticconstexpr |
Bitfield hint, if set stating globally enabled GL#GL_DEPTH_TEST, otherwise disabled.
Shall be set via setHintBits(int) and cleared via clearHintBits(int).
GLRegion's draw-method may toggle depth test, and reset it's state according to this hint.
Shall be set by custom code, e.g. after RenderState or RegionRenderer construction.
Definition at line 102 of file RenderState.hpp.
|
staticconstexpr |
Definition at line 104 of file RenderState.hpp.