Specularmap support,

(fix bug in texture binding!)
This commit is contained in:
4VRDriver
2020-09-06 20:37:59 +02:00
parent bd2df7e928
commit 8b1fe545c1
7 changed files with 27 additions and 55 deletions

View File

@@ -27,10 +27,6 @@ VertexBuffer::VertexBuffer(void *vertexData, void *indexData, uint32_t numVertic
// UV Texture Mapping
glEnableVertexAttribArray(2);
glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*) offsetof(struct Vertex, textureCoords));
// Color
glEnableVertexAttribArray(3);
glVertexAttribPointer(3, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*) offsetof(struct Vertex, color));
// This will also unbind the vertex buffer and index buffer
glBindVertexArray(0);