DarkBASIC Professional Help File

DX11:CONSTANTBUFFER

Constant buffers are used to send data to the GPU for use in shaders. Currently these can only be
assigned to shader techniques, but it would be possible to set them on a per-object or per-limb basis
later on, although doing that will cause some overhead if the constant data has to be swapped about a lot
for different objects / limbs.

    DX11 CREATE CBUFFER : Return Dword = DX11 CREATE CBUFFER(size, [createDynamic])

    DX11 DELETE CBUFFER : DX11 DELETE CBUFFER cbuffer

    DX11 CBUFFER EXISTS : Return Boolean = DX11 CBUFFER EXISTS(cbuffer)

    DX11 SET CBUFFER FLOAT : DX11 SET CBUFFER FLOAT cbuffer, offset, data

    DX11 SET CBUFFER INTEGER : DX11 SET CBUFFER INTEGER cbuffer, offset, data

    DX11 SET CBUFFER DWORD : DX11 SET CBUFFER DWORD cbuffer, offset, data

    DX11 SET CBUFFER BOOLEAN : DX11 SET CBUFFER BOOLEAN cbuffer, offset, data

    DX11 SET CBUFFER VECTOR2 : DX11 SET CBUFFER VECTOR2 cbuffer, offset, vector

    DX11 SET CBUFFER VECTOR3 : DX11 SET CBUFFER VECTOR3 cbuffer, offset, vector

    DX11 SET CBUFFER VECTOR4 : DX11 SET CBUFFER VECTOR4 cbuffer, offset, vector

    DX11 SET CBUFFER MATRIX : DX11 SET CBUFFER MATRIX cbuffer, offset, matrix

    DX11 GET CBUFFER SIZE : Return Dword = DX11 GET CBUFFER SIZE(cbuffer)