ID3D10Device::CreateGeometryShaderWithStreamOutput method (d3d10.h)

Creates a geometry shader that can write to streaming output buffers.


HRESULT CreateGeometryShaderWithStreamOutput(
  [in]  const void                       *pShaderBytecode,
  [in]  SIZE_T                           BytecodeLength,
  [in]  const D3D10_SO_DECLARATION_ENTRY *pSODeclaration,
  [in]  UINT                             NumEntries,
  [in]  UINT                             OutputStreamStride,
  [out] ID3D10GeometryShader             **ppGeometryShader


[in] pShaderBytecode

Type: const void*

A pointer to the compiled geometry shader for a standard geometry shader plus stream output. For info on how to get this pointer, see Getting a Pointer to a Compiled Shader.

To create the stream output without using a geometry shader, pass a pointer to the output signature for the prior stage. To obtain this output signature, call the D3DGetOutputSignatureBlob compiler function. You can also pass a pointer to the compiled vertex shader that is used in the prior stage. This compiled shader provides the output signature for the data.

[in] BytecodeLength

Type: SIZE_T

Size of the compiled geometry shader.

[in] pSODeclaration


Pointer to a D3D10_SO_DECLARATION_ENTRY array. Cannot be NULL if NumEntries> 0.

[in] NumEntries

Type: UINT

The number of entries in the array pointed to by pSODeclaration. Minimum 0, maximum 64.

[in] OutputStreamStride

Type: UINT

The size, in bytes, of each element in the array pointed to by pSODeclaration. This parameter is only used when the output slot is 0 for all entries in pSODeclaration.

[out] ppGeometryShader

Type: ID3D10GeometryShader**

Address of a pointer to an ID3D10GeometryShader Interface. If this is NULL, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of S_OK.

Return value


This method returns one of the Direct3D 10 Return Codes.


For more info about using CreateGeometryShaderWithStreamOutput, see Create a Geometry-Shader Object with Stream Output.


Target Platform Windows
Header d3d10.h
Library D3D10.lib

See also

ID3D10Device Interface