I'm trying to draw a simple square with dx11, but the order of the indices of each triangle determines whether or not it shows up. I set the cull mode to none in the rasterizer state, but it doesn't seem to change anything.
If I specify the vertices of the first triangle to be 0, 1, 2 instead of 2, 1, 0 then the triangle doesn't show up. So my question is, do I need to order the vertices of a triangle in a specific way regardless of the cull mode?
P.S. I'm drawing a triangle list and not a strip.
UINT indices[] = {2, 1, 0,
1, 3, 0};
MeshVertex vertices[] =
{
{ Vector3(1.0f, 1.0f, 0.0f)}, //Top Right
{ Vector3(-1.0f, -1.0f, 0.0f)}, //Bottom Left
{ Vector3(1.0f, -1.0f, 0.0f)}, //Bottom Right
{ Vector3(-1.0f, 1.0f, 0.0f)} //Top Left
};
mesh = new Mesh(vertices, indices, 4, 6, shader);