Original Post
Hi there,
I'd like to pass a float array to the GPU, using DirectX 11 and HLSL. But obvioulsy the following approach doesn't work:
cbuffer cbArray : register( b0 )
{
float g_floatArray[6];
};
I just found a thread about the same topic, but the answer there is to vague for me: http://forums.nvidia.com/index.php?showtopic=169643
I am new to DirectX and HLSL, so I don't know what to do now. It doesn't necessarily have to be a constant buffer - I just want to pass an array from the CPU to the GPU.
Any Suggestions?
I'd like to pass a float array to the GPU, using DirectX 11 and HLSL. But obvioulsy the following approach doesn't work:
cbuffer cbArray : register( b0 )
{
float g_floatArray[6];
};
I just found a thread about the same topic, but the answer there is to vague for me: http://forums.nvidia.com/index.php?showtopic=169643
I am new to DirectX and HLSL, so I don't know what to do now. It doesn't necessarily have to be a constant buffer - I just want to pass an array from the CPU to the GPU.
Any Suggestions?