Original Post
The reason why I want to create a second constant buffer is to render a second cube, Is there another way to create a duplicate of a cube .
I understand creating the second constant buffer, It how do I run both constant buffers at the same time using VSSetConstantBuffers function
cbuffer cbuffer0 : register(b0)
{
//..
}
cbuffer cbuffer1 : register(b1)
{
//...
}
ID3D11Buffer** ppCBuffers = {pCBuffer0, pCBuffer1};
VSSetConstantBuffers(0, 2, ppCBuffers);
Assuming you're using DirectX 11, you can declare two constant buffers in HLSL like this:
I'm getting an error when it comes to CreateVertexShader function
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more