From 402ef2973489a73aa1b5d31345ab0d970035b649 Mon Sep 17 00:00:00 2001 From: elipzer Date: Mon, 15 Oct 2018 11:28:35 -0400 Subject: [PATCH] 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 --- CharcoalBuiltin/TexturedBatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CharcoalBuiltin/TexturedBatch.h b/CharcoalBuiltin/TexturedBatch.h index b43f515..717eb3e 100644 --- a/CharcoalBuiltin/TexturedBatch.h +++ b/CharcoalBuiltin/TexturedBatch.h @@ -23,7 +23,7 @@ namespace charcoal glEnableVertexAttribArray(1); 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(1, 0);