• Create Account

### #Actualkarwosts

Posted 29 October 2012 - 02:58 PM

Can I ask why these vertices are arranged so oddly?

m_verticies[0].x = -1.0f; m_verticies[1].y = 1.0f; m_verticies[1].z = 0.0f;
m_verticies[0].u = 0.0f; m_verticies[1].v = 0.0f;

m_verticies[1].x = -1.0f; m_verticies[0].y = -1.0f; m_verticies[0].z = 0.0f;
m_verticies[1].u = 0.0f; m_verticies[0].v = 1.0f;

m_verticies[2].x = 1.0f; m_verticies[3].y = -1.0f; m_verticies[3].z = 0.0f;
m_verticies[2].u = 1.0f; m_verticies[3].v = 1.0f;

m_verticies[3].x = 1.0f; m_verticies[2].y = 1.0f; m_verticies[2].z = 0.0f;
m_verticies[3].u = 1.0f; m_verticies[2].v = 0.0f;

Note that if you draw out the triangles (0,1,2) and (3,2,1) it doesn't make a quad, but rather a weird shape that only covers 75% of a quad (the second triangle should be (3,2,0))

Also your two triangles as they are are wound in opposing directions. (0,1,2) is clockwise, and (3,2,1) is counterclockwise. Do you have any face culling enabled?

### #1karwosts

Posted 29 October 2012 - 02:56 PM

Can I ask why these vertices are arranged so oddly?

m_verticies[0].x = -1.0f; m_verticies[1].y = 1.0f; m_verticies[1].z = 0.0f;
m_verticies[0].u = 0.0f; m_verticies[1].v = 0.0f;

m_verticies[1].x = -1.0f; m_verticies[0].y = -1.0f; m_verticies[0].z = 0.0f;
m_verticies[1].u = 0.0f; m_verticies[0].v = 1.0f;

m_verticies[2].x = 1.0f; m_verticies[3].y = -1.0f; m_verticies[3].z = 0.0f;
m_verticies[2].u = 1.0f; m_verticies[3].v = 1.0f;

m_verticies[3].x = 1.0f; m_verticies[2].y = 1.0f; m_verticies[2].z = 0.0f;
m_verticies[3].u = 1.0f; m_verticies[2].v = 0.0f;

Note that if you draw out the triangles (0,1,2) and (3,2,1) it doesn't make a quad, but rather a weird shape that only covers 75% of a quad (the second triangle should be (3,2,0))

Also your two triangles as they are are wound in opposing directions. (0,1,2) is clockwise, and (3,2,1) is counterclockwise. Do you have any face culling enabled?

PARTNERS