ID3D11DeviceContext::GSSetConstantBuffers Method

Set the constant buffers used by the geometry shader pipeline stage.

Syntax

void GSSetConstantBuffers(
  [in]  UINT StartSlot,
  [in]  UINT NumBuffers,
  [in]  ID3D11Buffer *const *ppConstantBuffers
);

Parameter

  • StartSlot [in]
    Typ: UINT

    Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1).

  • NumBuffers [in]
    Typ: UINT

    Number of buffers to set (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot).

  • ppConstantBuffers [in]
    Typ: ID3D11Buffer*

    Array of constant buffers (see ID3D11Buffer) being given to the device.

Rückgabewert

Methode gibt keinen Wert zurück.

Hinweise

The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.

You can't use the ID3D11ShaderReflectionConstantBuffer interface to get information about what is currently bound to the pipeline in the device context. But, you can use ID3D11ShaderReflectionConstantBuffer to get information from a compiled shader. For example, you can use ID3D11ShaderReflectionConstantBuffer and ID3D11ShaderReflectionVariable to determine the slot in which a geometry shader expects a constant buffer. You can then pass this slot number to GSSetConstantBuffers to set the constant buffer. You can call the D3D11Reflect function to retrieve the address of a pointer to the ID3D11ShaderReflection interface and then call ID3D11ShaderReflection::GetConstantBufferByName to get a pointer to ID3D11ShaderReflectionConstantBuffer.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11DeviceContext