Hi all, beginner question here.
So initially, I have managed to draw a textured cube by specifying all 36 vertices in a vertices[] array, each one with its own texture coordinates, and using glDrawArrays(). Worked fine.
After that, i wanted to do that using glDrawElements, so i specified the indices[] array (size of 36) and specified only 8 vertices in the vertices[] array.
Although the geometry was rendered ok, I had problems with the textures, and I then realized that this approach would not work. I understood the reason for that: A single point needed to have different texture coordinates each time it was part of a different face, so it has to be considered a different vertex, although these vertices would have the same position.
What is the correct approach to do this? Is there in any way doable (i'm pretty sure it is, somehow) or do you have to define different vertices, end of story? Just a few pointers to the right direction will suffice, I'll handle the rest :)
Thanks in advance!