17 D3D11_BUFFER_DESC desc;
19 desc.Usage = D3D11_USAGE_DEFAULT;
22 desc.MiscFlags = D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS;
23 desc.StructureByteStride = 0;
26 ID3D11Buffer*
buffer =
nullptr;
30 D3D11_SUBRESOURCE_DATA
data;
31 data.pSysMem = iabuffer->
GetData();
33 data.SysMemSlicePitch = 0;
34 hr = device->CreateBuffer(&desc, &data, &buffer);
38 hr = device->CreateBuffer(&desc,
nullptr, &buffer);
48 return std::make_shared<DX11IndirectArgumentsBuffer>(
49 reinterpret_cast<ID3D11Device*
>(device),
50 static_cast<IndirectArgumentsBuffer const*>(
object));
#define CHECK_HR_RETURN_NONE(msg)
GraphicsObjectType GetType() const
DX11IndirectArgumentsBuffer(ID3D11Device *device, IndirectArgumentsBuffer const *iabuffer)
GT_INDIRECT_ARGUMENTS_BUFFER
#define LogError(message)
static std::shared_ptr< GEObject > Create(void *device, GraphicsObject const *object)
ID3D11DeviceChild * mDXObject
unsigned int GetNumBytes() const
char const * GetData() const
#define D3D11_CPU_ACCESS_NONE