InputElement constructor parameter order...
Closed this issue · 2 comments
GoogleCodeExporter commented
InputElement's constructor parameter order doesn't match
D3D10_INPUT_ELEMENT_DESC order. It swaps the slot and the offest. March
2009 SP1 version of slimdx. It's unclear if this is by design and if so
what the rationale is...
See http://msdn.microsoft.com/en-us/library/bb205316(VS.85).aspx
Example from DX10 tutorials:
D3D10_INPUT_ELEMENT_DESC layout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0,
D3D10_INPUT_PER_VERTEX_DATA, 0 },
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12,
D3D10_INPUT_PER_VERTEX_DATA, 0 },
};
With SlimDX:
var layout = new[] {
new InputElement("POSITION", 0, Format.R32G32B32_Float, 0,
0, InputClassification.PerVertexData, 0),
new InputElement("COLOR", 0, Format.R32G32B32A32_Float, 12,
0, InputClassification.PerVertexData, 0),
};
Note the swapped order of 12 and 0 in the color input element.
Original issue reported on code.google.com by randyri...@gmail.com
on 16 Jun 2009 at 7:59
GoogleCodeExporter commented
It was by design (to cluster the slot and slotClass parameters for the
appropriate
constructor, is all), and in any case would be far to serious a breaking change
to
consider now.
Original comment by josh.petrie
on 17 Jun 2009 at 1:12
- Changed state: WontFix
GoogleCodeExporter commented
Original comment by josh.petrie
on 17 Jun 2009 at 1:13