cbuffer frame_constants {
float4 frame_rect;
float4x4 frame_transform;
};
cbuffer glyph_buffer { uint4 glyph_data[4096]; };
In order to create an effect variable for 'frame_constants' I need to use ID3DX11Effect::GetConstantBufferByName(). Using ID3DX11Effect::GetVariableByName() followed by AsConstantBuffer() doesn't work, despite the fact that ID3DX11EffectConstantBuffer inherits from ID3DX11EffectVariable.On the other hand to create an effect variable for 'glyph_buffer' I need to use ID3DX11Effect::GetVariableByName() followed by AsVector(). Calling ID3DX11Effect::GetConstantBufferByName() causes an error.
I'm rather confused at this discrepancy. I'm also not entirely sure how I would assign an ID3D11Buffer to the 'glyph_buffer' effect variable (apart from manually binding it to a constant buffer register and just going around the entire effect framework) if I can't treat it as a constant buffer.
Anyone have any ideas?