I’m trying to do very simple rendering.
My vertex buffer has 8 floats per vertex (3 for position, 3 for normal, 2 for texture)
I’m drawing two triangles, each having its 3 vertices, but I’m getting one triangle drawing ok, and the other with strange results.
These are the vertices (CCW, as required)
-0.5,0.5,0,0,0,1,0,0
0.5,-0.5,0,0,0,1,1,1
0.5,0.5,0,0,0,1,1,0
-0.5,0.5,0,0,0,1,0,0
-0.5,-0.5,0,0,0,1,0,1
0.5,-0.5,0,0,0,1,1,1
and the indices are simply 0,1,2 and 3,4,5
My texture is the test pattern:
and the resulting rendering looks like:
I would appreciate any idea on why this happens.