I'm making a minecraft style game and I decided to add a VBO with the texture atkas coordinates of the vertices but it is appearing all white. However I'm following the same process as another VBO for the block positions which works
the one that works
glBindBuffer(GL_ARRAY_BUFFER,chunk->posOffsetVBO);
glBufferData(GL_ARRAY_BUFFER,sizeof(glm::vec3)*65536,NULL,GL_DYNAMIC_DRAW);
glVertexAttribPointer(2,3,GL_FLOAT,GL_FALSE,3*sizeof(GLfloat),(GLvoid*)0);
glEnableVertexAttribArray(2);
glVertexAttribDivisor(2,1);
then I fill it with glm::vec3s like this
glBindBuffer(GL_ARRAY_BUFFER,adjacentChunks[1][1]->posOffsetVBO);
glBufferSubData(GL_ARRAY_BUFFER,0,sizeof(posOffsets),&posOffsets[0]);
this is the one with the texture coordinates that doesn't work
glBindBuffer(GL_ARRAY_BUFFER,chunk->texCoordVBO);
glBufferData(GL_ARRAY_BUFFER,sizeof(glm::vec2)*36*1000,NULL,GL_DYNAMIC_DRAW);
glVertexAttribPointer(1,2,GL_FLOAT,GL_FALSE,2*sizeof(GLfloat),(GLvoid*)0);
glEnableVertexAttribArray(1);
then fill It with 36 glm::vec2s for each block so one per vertex
glBindBuffer(GL_ARRAY_BUFFER,adjacentChunks[1][1]->texCoordVBO);
glBufferSubData(GL_ARRAY_BUFFER,0,sizeof(texCoords),&texCoords[0]);
Is there a reason why the texture one doesn't work?