OpenGL Pipeline State

class renderdoc.GLState

The full current OpenGL pipeline state.

atomicBuffers

The currently bound atomic buffers.

Type

List[GLBuffer]

computeShader

The compute shader stage.

Type

GLShader

depthState

The depth state.

Type

GLDepthState

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

images

The currently bound load/store images.

Type

List[GLImageLoadStore]

pipelineResourceId

The ResourceId of the program pipeline (if active).

rasterizer

The rasterization configuration.

Type

GLRasterizer

samplers

The currently bound samplers.

type

List[GLSampler]

shaderStorageBuffers

The currently bound shader storage buffers.

Type

List[GLBuffer]

stencilState

The stencil state.

Type

GLStencilState

tessControlShader

The tessellation control shader stage.

Type

GLShader

tessEvalShader

The tessellation evaluation shader stage.

Type

GLShader

textures

The currently bound textures.

Type

List[GLTexture]

transformFeedback

The transform feedback stage.

Type

GLFeedback

uniformBuffers

The currently bound uniform buffers.

Type

List[GLBuffer]

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.

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.

primitiveRestart

True if primitive restart is enabled for strip primitives.

provokingVertexLast

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

False if the provoking vertex is the first one.

restartIndex

The index value to use to indicate a strip restart.

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.

vertexArrayObject

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

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.

byteOffset

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

enabled

True if this vertex attribute is enabled.

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.

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.

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.

byteStride

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

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.

resourceId

The ResourceId of the buffer bound to this slot.

Shader

class renderdoc.GLShader

Describes an OpenGL shader stage.

bindpointMapping

The bindpoint mapping data to match reflection.

Type

ShaderBindpointMapping

programResourceId

The ResourceId of the program bound to this stage.

reflection

The reflection data for this shader.

Type

ShaderReflection

shaderResourceId

The ResourceId of the shader object itself.

stage

A ShaderStage identifying which stage this shader is bound to.

subroutines

A list of integers with the subroutine values.

Type

List[int]

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.

clipOriginLowerLeft

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

False if it’s in the upper left.

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.

Shader Bindings

class renderdoc.GLTexture

Describes the details of a texture.

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.

depthReadChannel

The channel to read from in a depth-stencil texture.

-1 for non depth-stencil textures.

0 if depth should be read.

1 if stencil should be read.

firstMip

Valid for textures - the first mip that is available.

numMips

Valid for textures - the number of mips that are available.

resourceId

The ResourceId of the underlying resource the view refers to.

swizzle

The swizzle applied to a texture.

Type

TextureSwizzle4

type

The TextureType of the texture.

class renderdoc.GLSampler

Describes the sampler properties of a texture.

UseBorder()

Check if the border color is used in this OpenGL sampler.

Returns

True if the border color is used, False otherwise.

Return type

bool

addressR

The AddressMode in the R direction.

addressS

The AddressMode in the S direction.

addressT

The AddressMode in the T direction.

borderColor

The RGBA border color.

Type

Tuple[float,float,float,float]

compareFunction

The CompareFunction for comparison samplers.

filter

The filtering mode.

Type

TextureFilter

maxAnisotropy

The maximum anisotropic filtering level to use.

maxLOD

The maximum mip level that can be used.

minLOD

The minimum mip level that can be used.

mipLODBias

A bias to apply to the calculated mip level before sampling.

resourceId

The ResourceId of the sampler object, if a separate one is set.

seamlessCubeMap

True if seamless cubemap filtering is enabled for this texture.

class renderdoc.GLBuffer

Describes the properties of a buffer.

byteOffset

The byte offset from the start of the buffer.

byteSize

The byte size of the buffer.

resourceId

The ResourceId of the buffer object.

class renderdoc.GLImageLoadStore

Describes the properties of a load/store image.

imageFormat

The format that the image is bound as.

Type

ResourceFormat

layered

True if multiple layers are bound together to the image. False if only one layer is bound.

mipLevel

The mip of the texture that’s used in the attachment.

readAllowed

True if loading from the image is allowed.

resourceId

The ResourceId of the texture object.

slice

The slice of the texture that’s used in the attachment.

type

The TextureType of the texture.

writeAllowed

True if storing to the image is allowed.

Transform Feedback

class renderdoc.GLFeedback

Describes the current feedback state.

active

True if the transform feedback object is currently active.

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.

paused

True if the transform feedback object is currently paused.

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.

alphaToOne

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

cullMode

The polygon CullMode.

depthBias

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

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.

fillMode

The polygon FillMode.

frontCCW

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

lineWidth

The fixed line width in pixels.

minSampleShadingRate

The minimum sample shading rate.

multisampleEnable

True if multisampling should be used during rendering.

offsetClamp

The clamp value for calculated depth bias from depthBias and slopeScaledDepthBias

pointFadeThreshold

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

pointOriginUpperLeft

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

pointSize

The fixed point size in pixels.

programmablePointSize

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

sampleCoverage

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

sampleCoverageInvert

True if the temporary sample coverage mask should be inverted.

sampleCoverageValue

The sample coverage value used if sampleCoverage is True.

sampleMask

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

sampleMaskValue

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

sampleShading

True if rendering should happen at sample-rate frequency.

slopeScaledDepthBias

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

Depth/Stencil State

class renderdoc.GLDepthState

Describes the depth state.

depthBounds

True if depth bounds tests should be applied.

depthEnable

True if depth testing should be performed.

depthFunction

The CompareFunction to use for testing depth values.

depthWrites

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

farBound

The far plane bounding value.

nearBound

The near plane bounding value.

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.

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.

drawFBO

The draw framebuffer.

Type

GLFBO

framebufferSRGB

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

readFBO

The read framebuffer.

Type

GLFBO

class renderdoc.GLFBO

Describes the contents of a framebuffer object.

colorAttachments

The framebuffer color attachments.

Type

List[GLAttachment]

depthAttachment

The framebuffer depth attachment.

Type

GLAttachment

drawBuffers

The draw buffer indices into the colorAttachments attachment list.

Type

List[int]

readBuffer

The read buffer index in the colorAttachments attachment list.

resourceId

The ResourceId of the framebuffer.

stencilAttachment

The framebuffer stencil attachment.

Type

GLAttachment

class renderdoc.GLAttachment

Describes the state of a framebuffer attachment.

mipLevel

The mip of the texture that’s used in the attachment.

numSlices

The number of slices of the texture that are used in the attachment.

resourceId

The ResourceId of the texture bound to this attachment.

slice

The slice of the texture that’s used in the attachment.

swizzle

The swizzle applied to the texture.

Type

TextureSwizzle4

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.

lineSmoothing

A QualityHint with the line smoothing hint.

lineSmoothingEnabled

True if line smoothing is enabled.

polySmoothing

A QualityHint with the polygon smoothing hint.

polySmoothingEnabled

True if polygon smoothing is enabled.

textureCompression

A QualityHint with the texture compression hint.

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.