API Reference: OpenGL Pipeline State¶

This is the API reference for the functions, classes, and enums in the renderdoc module which represents the underlying interface that the UI is built on top of. For more high-level information and instructions on using the python API, see Python API.

class renderdoc.GLState¶

The full current OpenGL pipeline state.

computeShader¶

The compute shader stage.

Type:

GLShader

depthState¶

The depth state.

Type:

GLDepthState

descriptorByteSize¶

The byte size of a descriptor in the virtual descriptor storage.

Type:

int

descriptorCount¶

The number of descriptors in the virtual descriptor storage.

Type:

int

descriptorStore¶

The virtual descriptor storage.

Type:

ResourceId

fragmentShader¶

The fragment shader stage.

Type:

GLShader

framebuffer¶

The bound framebuffer.

Type:

GLFrameBuffer

geometryShader¶

The geometry shader stage.

Type:

GLShader

hints¶

The hint state.

Type:

GLHints

pipelineResourceId¶

The ResourceId of the program pipeline (if active).

Type:

ResourceId

rasterizer¶

The rasterization configuration.

Type:

GLRasterizer

stencilState¶

The stencil state.

Type:

GLStencilState

tessControlShader¶

The tessellation control shader stage.

Type:

GLShader

tessEvalShader¶

The tessellation evaluation shader stage.

Type:

GLShader

textureCompleteness¶

Texture completeness issues of descriptors in the descriptor store.

Type:

GLTextureCompleteness

transformFeedback¶

The transform feedback stage.

Type:

GLFeedback

vertexInput¶

The vertex input stage.

Type:

GLVertexInput

vertexProcessing¶

The fixed-function vertex processing stage.

Type:

GLFixedVertexProcessing

vertexShader¶

The vertex shader stage.

Type:

GLShader

Vertex Input¶

class renderdoc.GLVertexInput¶

Describes the setup for fixed-function vertex input fetch.

attributes¶

The vertex attributes.

Type:

List[GLVertexAttribute]

indexBuffer¶

The ResourceId of the index buffer.

Type:

ResourceId

indexByteStride¶

The byte width of the index buffer - typically 1, 2 or 4 bytes. It can be 0 for non-indexed draws.

Note

This does not correspond to a real GL state since the index type is specified per-action in the call itself. This is an implicit state derived from the last (or current) action at any given event.

Type:

int

primitiveRestart¶

True if primitive restart is enabled for strip primitives.

Type:

bool

provokingVertexLast¶

True if the provoking vertex is the last one in the primitive.

False if the provoking vertex is the first one.

Type:

bool

restartIndex¶

The index value to use to indicate a strip restart.

Type:

int

topology¶

The byte width of the index buffer - typically 1, 2 or 4 bytes.

Note

This does not correspond to a real GL state since the topology is specified per-action in the call itself. This is an implicit state derived from the last (or current) action at any given event.

Type:

Topology

vertexArrayObject¶

The ResourceId of the vertex array object that’s bound.

Type:

ResourceId

vertexBuffers¶

The vertex buffers.

Type:

List[GLVertexBuffer]

class renderdoc.GLVertexAttribute¶

Describes the configuration for a single vertex attribute.

Note

If old-style vertex attrib pointer setup was used for the vertex attributes then it will be decomposed into 1:1 attributes and buffers.

boundShaderInput¶

This lists which shader input is bound to this attribute, as an index in the ShaderReflection.inputSignature list.

If any value is set to -1 then the attribute is unbound.

Type:

int

byteOffset¶

The byte offset from the start of the vertex data in the vertex buffer from vertexBufferSlot.

Type:

int

enabled¶

True if this vertex attribute is enabled.

Type:

bool

floatCast¶

Only valid for integer formatted attributes, True if they are cast to float.

This is because they were specified with an integer format but glVertexAttribFormat (not glVertexAttribIFormat) so they will be cast.

Type:

bool

format¶

The format describing how the vertex attribute is interpreted.

Type:

ResourceFormat

genericValue¶

The generic value of the vertex attribute if no buffer is bound.

Type:

PixelValue

vertexBufferSlot¶

The vertex buffer input slot where the data is sourced from.

Type:

int

class renderdoc.GLVertexBuffer¶

Describes a single OpenGL vertex buffer binding.

byteOffset¶

The byte offset from the start of the buffer to the beginning of the vertex data.

Type:

int

byteStride¶

The byte stride between the start of one set of vertex data and the next.

Type:

int

instanceDivisor¶

The instance rate divisor.

If this is 0 then the vertex buffer is read at vertex rate.

If it’s 1 then one element is read for each instance, and for N greater than 1 then N instances read the same element before advancing.

Type:

int

resourceId¶

The ResourceId of the buffer bound to this slot.

Type:

ResourceId

Shader¶

class renderdoc.GLShader¶

Describes an OpenGL shader stage.

programResourceId¶

The ResourceId of the program bound to this stage.

Type:

ResourceId

reflection¶

The reflection data for this shader.

Type:

ShaderReflection

shaderResourceId¶

The ResourceId of the shader object itself.

Type:

ResourceId

stage¶

A ShaderStage identifying which stage this shader is bound to.

Type:

ShaderStage

subroutines¶

A list of integers with the subroutine values.

Type:

List[int]

class renderdoc.GLTextureCompleteness¶

Describes the a texture completeness issue of a descriptor.

completeStatus¶

The details of the texture’s (in)completeness. If this string is empty, the texture is complete. Otherwise it contains an explanation of why the texture is believed to be incomplete.

Type:

str

descriptorByteOffset¶

The byte offset in the GL descriptor storage of the problematic descriptor

Type:

int

typeConflict¶

The details of any type conflict on this binding. This can happen if multiple uniforms are pointing to the same binding but with different types. In this case it is impossible to disambiguate which binding was used.

If this string is empty, no conflict is present. Otherwise it contains the bindings which are in conflict and their types.

Type:

str

Fixed Vertex Processing¶

class renderdoc.GLFixedVertexProcessing¶

Describes the setup for fixed vertex processing operations.

clipNegativeOneToOne¶

True if the clip-space Z goes from -1 to 1.

False if the clip-space Z goes from 0 to 1.

Type:

bool

clipOriginLowerLeft¶

True if the clipping origin should be in the lower left.

False if it’s in the upper left.

Type:

bool

clipPlanes¶

An 8-tuple of bool determining which user clipping planes are enabled.

Type:

Tuple[bool,…]

defaultInnerLevel¶

A tuple of float giving the default inner level of tessellation.

Type:

Tuple[float,float]

defaultOuterLevel¶

A tuple of float giving the default outer level of tessellation.

Type:

Tuple[float,float,float,float]

discard¶

True if primitives should be discarded during rasterization.

Type:

bool

Transform Feedback¶

class renderdoc.GLFeedback¶

Describes the current feedback state.

active¶

True if the transform feedback object is currently active.

Type:

bool

bufferResourceId¶

The buffer bindings.

Type:

Tuple[ResourceId,ResourceId,ResourceId,ResourceId]

byteOffset¶

The buffer byte offsets.

Type:

Tuple[int,int,int,int]

byteSize¶

The buffer byte sizes.

Type:

Tuple[int,int,int,int]

feedbackResourceId¶

The ResourceId of the transform feedback binding.

Type:

ResourceId

paused¶

True if the transform feedback object is currently paused.

Type:

bool

Rasterizer¶

class renderdoc.GLRasterizer¶

Describes the rasterization state of the OpenGL pipeline.

scissors¶

The bound scissor regions.

Type:

List[Scissor]

state¶

The details of the rasterization state.

Type:

GLRasterizerState

viewports¶

The bound viewports.

Type:

List[Viewport]

class renderdoc.GLRasterizerState¶

Describes the rasterizer state toggles.

alphaToCoverage¶

True if alpha-to-coverage should be used when blending to an MSAA target.

Type:

bool

alphaToOne¶

True if alpha-to-one should be used when blending to an MSAA target.

Type:

bool

cullMode¶

The polygon CullMode.

Type:

CullMode

depthBias¶

The fixed depth bias value to apply to z-values.

Type:

float

depthClamp¶

True if pixels outside of the near and far depth planes should be clamped and to 0.0 to 1.0 and not clipped.

Type:

bool

fillMode¶

The polygon FillMode.

Type:

FillMode

frontCCW¶

True if counter-clockwise polygons are front-facing. False if clockwise polygons are front-facing.

Type:

bool

lineWidth¶

The fixed line width in pixels.

Type:

float

minSampleShadingRate¶

The minimum sample shading rate.

Type:

float

multisampleEnable¶

True if multisampling should be used during rendering.

Type:

bool

offsetClamp¶

The clamp value for calculated depth bias from depthBias and slopeScaledDepthBias

Type:

float

pointFadeThreshold¶

The threshold value at which points are clipped if they exceed this size.

Type:

float

pointOriginUpperLeft¶

True if the point sprite texture origin is upper-left. False if lower-left.

Type:

bool

pointSize¶

The fixed point size in pixels.

Type:

float

programmablePointSize¶

True if the point size can be programmably exported from a shader.

Type:

bool

sampleCoverage¶

True if a temporary mask using sampleCoverageValue should be used to resolve the final output color.

Type:

bool

sampleCoverageInvert¶

True if the temporary sample coverage mask should be inverted.

Type:

bool

sampleCoverageValue¶

The sample coverage value used if sampleCoverage is True.

Type:

float

sampleMask¶

True if the generated samples should be bitwise AND masked with sampleMaskValue.

Type:

bool

sampleMaskValue¶

The sample mask value that should be masked against the generated coverage.

Type:

int

sampleShading¶

True if rendering should happen at sample-rate frequency.

Type:

bool

slopeScaledDepthBias¶

The slope-scaled depth bias value to apply to z-values.

Type:

float

Depth/Stencil State¶

class renderdoc.GLDepthState¶

Describes the depth state.

depthBounds¶

True if depth bounds tests should be applied.

Type:

bool

depthEnable¶

True if depth testing should be performed.

Type:

bool

depthFunction¶

The CompareFunction to use for testing depth values.

Type:

CompareFunction

depthWrites¶

True if depth values should be written to the depth target.

Type:

bool

farBound¶

The far plane bounding value.

Type:

float

nearBound¶

The near plane bounding value.

Type:

float

class renderdoc.GLStencilState¶

Describes the stencil state.

backFace¶

The stencil state for back-facing polygons.

Type:

StencilFace

frontFace¶

The stencil state for front-facing polygons.

Type:

StencilFace

stencilEnable¶

True if stencil operations should be performed.

Type:

bool

Framebuffer¶

class renderdoc.GLFrameBuffer¶

Describes the current state of the framebuffer stage of the pipeline.

blendState¶

The details of the blending state.

Type:

GLBlendState

dither¶

True if dithering should be used when writing to color buffers.

Type:

bool

drawFBO¶

The draw framebuffer.

Type:

GLFBO

framebufferSRGB¶

True if sRGB correction should be applied when writing to an sRGB-formatted texture.

Type:

bool

readFBO¶

The read framebuffer.

Type:

GLFBO

class renderdoc.GLFBO¶

Describes the contents of a framebuffer object.

colorAttachments¶

The framebuffer color attachments.

Type:

List[Descriptor]

depthAttachment¶

The framebuffer depth attachment.

Type:

Descriptor

drawBuffers¶

The draw buffer indices into the colorAttachments attachment list.

Type:

List[int]

readBuffer¶

The read buffer index in the colorAttachments attachment list.

Type:

int

resourceId¶

The ResourceId of the framebuffer.

Type:

ResourceId

stencilAttachment¶

The framebuffer stencil attachment.

Type:

Descriptor

Blending¶

class renderdoc.GLBlendState¶

Describes the blend pipeline state.

blendFactor¶

The constant blend factor to use in blend equations.

Type:

Tuple[float,float,float,float]

blends¶

The blend operations for each target.

Type:

List[ColorBlend]

Hints¶

class renderdoc.GLHints¶

Describes the current state of GL hints and smoothing.

derivatives¶

A QualityHint with the derivatives hint.

Type:

QualityHint

lineSmoothing¶

A QualityHint with the line smoothing hint.

Type:

QualityHint

lineSmoothingEnabled¶

True if line smoothing is enabled.

Type:

bool

polySmoothing¶

A QualityHint with the polygon smoothing hint.

Type:

QualityHint

polySmoothingEnabled¶

True if polygon smoothing is enabled.

Type:

bool

textureCompression¶

A QualityHint with the texture compression hint.

Type:

QualityHint

class renderdoc.QualityHint(value)¶

An API specific hint for a certain behaviour. A legacy concept in OpenGL that controls hints to the implementation where there is room for interpretation within the range of valid behaviour.

DontCare¶

The hinted behaviour can follow any valid path as the implementation decides.

Nicest¶

The hinted behaviour should follow the most correct or highest quality path.

Fastest¶

The hinted behaviour should follow the most efficient path.