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.
- depthState¶
The depth state.
- Type:
- 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:
- framebuffer¶
The bound framebuffer.
- Type:
- pipelineResourceId¶
The
ResourceIdof the program pipeline (if active).- Type:
- rasterizer¶
The rasterization configuration.
- Type:
- stencilState¶
The stencil state.
- Type:
- textureCompleteness¶
Texture completeness issues of descriptors in the descriptor store.
- Type:
- transformFeedback¶
The transform feedback stage.
- Type:
- vertexInput¶
The vertex input stage.
- Type:
- vertexProcessing¶
The fixed-function vertex processing stage.
- Type:
Vertex Input¶
- class renderdoc.GLVertexInput¶
Describes the setup for fixed-function vertex input fetch.
- attributes¶
The vertex attributes.
- Type:
List[GLVertexAttribute]
- indexBuffer¶
The
ResourceIdof the index buffer.- Type:
- 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¶
Trueif primitive restart is enabled for strip primitives.- Type:
bool
- provokingVertexLast¶
Trueif the provoking vertex is the last one in the primitive.Falseif 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:
- vertexArrayObject¶
The
ResourceIdof the vertex array object that’s bound.- Type:
- 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.inputSignaturelist.If any value is set to
-1then 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¶
Trueif this vertex attribute is enabled.- Type:
bool
- floatCast¶
Only valid for integer formatted attributes,
Trueif 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:
- genericValue¶
The generic value of the vertex attribute if no buffer is bound.
- Type:
- 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
0then the vertex buffer is read at vertex rate.If it’s
1then one element is read for each instance, and forNgreater than1thenNinstances read the same element before advancing.- Type:
int
- resourceId¶
The
ResourceIdof the buffer bound to this slot.- Type:
Shader¶
- class renderdoc.GLShader¶
Describes an OpenGL shader stage.
- programResourceId¶
The
ResourceIdof the program bound to this stage.- Type:
- reflection¶
The reflection data for this shader.
- Type:
- shaderResourceId¶
The
ResourceIdof the shader object itself.- Type:
- stage¶
A
ShaderStageidentifying which stage this shader is bound to.- Type:
- 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¶
Trueif the clip-space Z goes from-1to1.Falseif the clip-space Z goes from0to1.- Type:
bool
- clipOriginLowerLeft¶
Trueif the clipping origin should be in the lower left.Falseif it’s in the upper left.- Type:
bool
- clipPlanes¶
An 8-tuple of
booldetermining which user clipping planes are enabled.- Type:
Tuple[bool,…]
- defaultInnerLevel¶
A tuple of
floatgiving the default inner level of tessellation.- Type:
Tuple[float,float]
- defaultOuterLevel¶
A tuple of
floatgiving the default outer level of tessellation.- Type:
Tuple[float,float,float,float]
- discard¶
Trueif primitives should be discarded during rasterization.- Type:
bool
Transform Feedback¶
- class renderdoc.GLFeedback¶
Describes the current feedback state.
- active¶
Trueif 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
ResourceIdof the transform feedback binding.- Type:
- paused¶
Trueif the transform feedback object is currently paused.- Type:
bool
Rasterizer¶
- class renderdoc.GLRasterizer¶
Describes the rasterization state of the OpenGL pipeline.
- state¶
The details of the rasterization state.
- Type:
- class renderdoc.GLRasterizerState¶
Describes the rasterizer state toggles.
- alphaToCoverage¶
Trueif alpha-to-coverage should be used when blending to an MSAA target.- Type:
bool
- alphaToOne¶
Trueif alpha-to-one should be used when blending to an MSAA target.- Type:
bool
- depthBias¶
The fixed depth bias value to apply to z-values.
- Type:
float
- depthClamp¶
Trueif pixels outside of the near and far depth planes should be clamped and to0.0to1.0and not clipped.- Type:
bool
- frontCCW¶
Trueif counter-clockwise polygons are front-facing.Falseif 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¶
Trueif multisampling should be used during rendering.- Type:
bool
- offsetClamp¶
The clamp value for calculated depth bias from
depthBiasandslopeScaledDepthBias- Type:
float
- pointFadeThreshold¶
The threshold value at which points are clipped if they exceed this size.
- Type:
float
- pointOriginUpperLeft¶
Trueif the point sprite texture origin is upper-left.Falseif lower-left.- Type:
bool
- pointSize¶
The fixed point size in pixels.
- Type:
float
- programmablePointSize¶
Trueif the point size can be programmably exported from a shader.- Type:
bool
- sampleCoverage¶
Trueif a temporary mask usingsampleCoverageValueshould be used to resolve the final output color.- Type:
bool
- sampleCoverageInvert¶
Trueif the temporary sample coverage mask should be inverted.- Type:
bool
- sampleCoverageValue¶
The sample coverage value used if
sampleCoverageisTrue.- Type:
float
- sampleMask¶
Trueif the generated samples should be bitwiseANDmasked withsampleMaskValue.- Type:
bool
- sampleMaskValue¶
The sample mask value that should be masked against the generated coverage.
- Type:
int
- sampleShading¶
Trueif 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¶
Trueif depth bounds tests should be applied.- Type:
bool
- depthEnable¶
Trueif depth testing should be performed.- Type:
bool
- depthFunction¶
The
CompareFunctionto use for testing depth values.- Type:
- depthWrites¶
Trueif 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
Framebuffer¶
- class renderdoc.GLFrameBuffer¶
Describes the current state of the framebuffer stage of the pipeline.
- blendState¶
The details of the blending state.
- Type:
- dither¶
Trueif dithering should be used when writing to color buffers.- Type:
bool
- framebufferSRGB¶
Trueif sRGB correction should be applied when writing to an sRGB-formatted texture.- Type:
bool
- class renderdoc.GLFBO¶
Describes the contents of a framebuffer object.
- colorAttachments¶
The framebuffer color attachments.
- Type:
List[Descriptor]
- depthAttachment¶
The framebuffer depth attachment.
- Type:
- drawBuffers¶
The draw buffer indices into the
colorAttachmentsattachment list.- Type:
List[int]
- readBuffer¶
The read buffer index in the
colorAttachmentsattachment list.- Type:
int
- resourceId¶
The
ResourceIdof the framebuffer.- Type:
- stencilAttachment¶
The framebuffer stencil attachment.
- Type:
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
QualityHintwith the derivatives hint.- Type:
- lineSmoothing¶
A
QualityHintwith the line smoothing hint.- Type:
- lineSmoothingEnabled¶
Trueif line smoothing is enabled.- Type:
bool
- polySmoothing¶
A
QualityHintwith the polygon smoothing hint.- Type:
- polySmoothingEnabled¶
Trueif polygon smoothing is enabled.- Type:
bool
- textureCompression¶
A
QualityHintwith the texture compression hint.- Type:
- 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.