LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::DrawIndexedIndirectArguments Struct Reference

Structure for the arguments of an indirect indexed draw command. More...

#include <IndirectArguments.h>

Public Attributes

std::uint32_t numIndices
 Specifies the number of indices per instance.
std::uint32_t numInstances
 Specifies the number of instances to draw.
std::uint32_t firstIndex
 Specifies the zero-based offset of the first index from the index buffer.
std::int32_t vertexOffset
 Specifies the base vertex offset (positive or negative) which is added to each index from the index buffer.
std::uint32_t firstInstance
 Specifies the zero-based offset of the first instance.

Detailed Description

Structure for the arguments of an indirect indexed draw command.

Remarks
This is a plain-old-data (POD) structure aligned with no default constructor to make it compatible between CPU and GPU memory space.
See also
CommandBuffer::DrawIndexedIndirect
OpenGL counterpart DrawElementsIndirectCommand: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_draw_indirect.txt
Vulkan counterpart VkDrawIndexedIndirectCommand: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkDrawIndexedIndirectCommand.html
Direct3D11 counterpart D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS: https://docs.microsoft.com/en-us/windows/desktop/api/d3d11/ns-d3d11-d3d11_draw_indexed_instanced_indirect_args
Direct3D12 counterpart D3D12_DRAW_INDEXED_ARGUMENTS: https://docs.microsoft.com/en-us/windows/desktop/api/D3D12/ns-d3d12-d3d12_draw_indexed_arguments
Metal counterpart MTLDrawIndexedPrimitivesIndirectArguments: https://developer.apple.com/documentation/metal/mtldrawindexedprimitivesindirectarguments?language=objc

Member Data Documentation

◆ firstIndex

std::uint32_t LLGL::DrawIndexedIndirectArguments::firstIndex

Specifies the zero-based offset of the first index from the index buffer.

◆ firstInstance

std::uint32_t LLGL::DrawIndexedIndirectArguments::firstInstance

Specifies the zero-based offset of the first instance.

Note
This parameter modifies the instance ID within the shader pipeline differently for SV_InstanceID in HLSL and gl_InstanceID in GLSL (or gl_InstanceIndex for Vulkan), due to rendering API differences. The system value SV_InstanceID in HLSL will always start with zero, but the system value gl_InstanceID in GLSL (or gl_InstanceIndex for Vulkan) will start with the value of firstInstance.

◆ numIndices

std::uint32_t LLGL::DrawIndexedIndirectArguments::numIndices

Specifies the number of indices per instance.

◆ numInstances

std::uint32_t LLGL::DrawIndexedIndirectArguments::numInstances

Specifies the number of instances to draw.

◆ vertexOffset

std::int32_t LLGL::DrawIndexedIndirectArguments::vertexOffset

Specifies the base vertex offset (positive or negative) which is added to each index from the index buffer.


The documentation for this struct was generated from the following file: