FastUIDraw
|
#include <gpu_dirty_state.hpp>
Public Types | |
enum | bit_flags { shader = 1 << 0, textures = 1 << 1, images = 1 << 2, blend_mode = 1 << 3, render_target = 1 << 4, viewport_scissor = 1 << 5, vertex_index_source = 1 << 6, constant_buffers = 1 << 7, storage_buffers = 1 << 8, depth_stencil = 1 << 9, buffer_masks = 1 << 10, hw_clip = 1 << 11, all = ~0u } |
Public Member Functions | |
gpu_dirty_state (uint32_t flags=0u) | |
operator uint32_t () const | |
operator uint32_t & () | |
Object to encapsulate GPU dirty state via bit-flags.
Definition at line 32 of file gpu_dirty_state.hpp.
Enumeration to specify the bit-flags to specify dirty GPU state.
Enumerator | |
---|---|
shader | If this bit is up, indicates that the shaders used by the GPU has changed. |
textures | If this bit is up, indicates that the binding of the texture binding slots used by the shader of a PainterBackend derived class have changed. For example, in GL these changes are accompished by calling glBindTexture(). |
images | If this bit is up, indicates that the binding of the image binding slots used by the shader of a PainterBackend derived class have changed. For example, in GL these changes are accompished by calling glBindImageTexture(). |
blend_mode | If this bit is up, indicates that the blend state of the GPU has changed. |
render_target | If this bit is up, indicates that the bound render-target of the GPU has changed. For example, in GL changing the render-target is accomplished by glBindFramgebuffer() and/or glDrawBuffers(). |
viewport_scissor | If this bit is up, indicates that the viewport or scissor values have changed. For example, in GL this is accomplished by calling glViewport(), glScissor() or glEnable/glDisable() passing GL_SCISSOR_TEST. |
vertex_index_source | If this bit is up, indicates that the source or format for index or vertex buffers has changed. For example, in GL, this can be accomplished by calling glBindVertexArray() or modifying the currently bound vertex array object. |
constant_buffers | If this bit is up, indicates that a constant buffer source has changed. For GL, these are UBOs. For example, in GL, this can be accomplished by calling glBindBuffer() with the binding target as GL_UNIFORM_BUFFER. |
storage_buffers | If this bit is up, indicates that a storage buffer source has changed. For GL, these are UBOs. For example, in GL, this can be accomplished by calling glBindBuffer() with the binding target as GL_SHADER_STORAGE_BUFFER. |
depth_stencil | If this bit is up, the depth or stencil test has been modified. |
buffer_masks | If this bit is up, the color, depth or stencil masks have changed. For example, in GL this is accomlished by called glColorMask() glDepthMask() or glStencilMask(). |
hw_clip | If this bit is up, indicates that the HW clip planes has changed. |
all | Specify that all state is dirty. |
Definition at line 39 of file gpu_dirty_state.hpp.
|
inline |
Ctor.
flags | bit field using bit_flags to specify what portion of GPU state is firty |
Definition at line 143 of file gpu_dirty_state.hpp.
|
inline |
Implicit cast-operator to uint32_t.
Definition at line 150 of file gpu_dirty_state.hpp.
|
inline |
Implicit cast-operator to uint32_t.
Definition at line 155 of file gpu_dirty_state.hpp.