I'm loading OBJs, which lend themselves well to setting up as indexed VBOs, since each vertex is only defined once and then a face definition will reference the same vertex more than once when they share an edge. I want to define face colors based on the materials loaded from the OBJ. This is quite easy in immediate mode, but I've realized that using VBOs will require me to duplicate each vertex in order to have two adjacent faces with different colors. What's the best way to go about solving this without duplicating vertices?
EDIT: Code (LWJGL)
//Get the VBO from the GPU glBindBuffer(GL_ARRAY_BUFFER, vbo); //Tell OpenGL what to expect from the VBO glVertexAttribPointer(0, 3, GL_FLOAT, false, Vertex.SIZE * 4, 0); //Location glVertexAttribPointer(1, 2, GL_FLOAT, false, Vertex.SIZE * 4, 4 * 3); //Texture Coord glVertexAttribPointer(2, 3, GL_FLOAT, false, Vertex.SIZE * 4, 4 * 3 + 4 * 2); //Normal glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo); glDrawElements(GL_TRIANGLES, size, GL_UNSIGNED_INT, 0);