DirectX10 How to use Constant Buffers
Posted
by
schnozzinkobenstein
on Game Development
See other posts from Game Development
or by schnozzinkobenstein
Published on 2011-02-10T03:05:03Z
Indexed on
2011/02/10
7:34 UTC
Read the original article
Hit count: 378
directx10
I'm trying to access some variables in my shader, but I think I'm doing this wrong. Say I have a constant buffer that looks like this:
cbuffer perFrame
{
float foo;
float bar;
};
I got an ID3D10EffectConstantBuffer reference to it, and I can get a specific index by calling GetMemberByIndex, but how can I figure out how many members perFrame has so that I can get each member without going out of bounds?
© Game Development or respective owner