Microsoft DirectX 8.1 (C++)

IDirect3DDevice8::SetVertexShaderConstant

Sets values in the vertex constant array.

HRESULT SetVertexShaderConstant(
  DWORD Register,
  CONST void* pConstantData,
  DWORD  ConstantCount
);

Parameters

Register
[in] Register address at which to start loading data into the vertex constant array.
pConstantData
[in] Pointer to the data block holding the values to load into the vertex constant array. The size of the data block is (ConstantCount * 4 * sizeof(float)).
ConstantCount
[in] Number of constants to load into the vertex constant array. Each constant is comprised of four floating-point values.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

This is the method used to load the constant registers of the vertex shader assembler. When loading transformation matrices, the application should transpose them row/column and load them into consecutive constant registers.

Requirements

  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.

See Also

IDirect3DDevice8::GetVertexShaderConstant