Fixed broken UV coords.

Was caused by sending the incorrect number of coords per each
vertex. Now there's a problem in that the UVS are flipped
horizontally
This commit is contained in:
elipzer 2018-10-15 11:28:35 -04:00
parent 94de35536a
commit 402ef29734

View File

@ -23,7 +23,7 @@ namespace charcoal
glEnableVertexAttribArray(1); glEnableVertexAttribArray(1);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, position)); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, position));
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, uv)); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, uv));
glVertexAttribDivisor(0, 0); glVertexAttribDivisor(0, 0);
glVertexAttribDivisor(1, 0); glVertexAttribDivisor(1, 0);