how do we pass to glDrawElements GL_QUADS a cube with:
is constructing a hard egde cube with 8 vertices possible?
usualy we do pass vertices and face index… normal count = vertex count… but what if we need to pass a normal index?
That’s not possible, at the moment. You need to replicate the vertices in the vertex-array, so that you have 24 normals and 24 vertices, although always 3 vertices are the same.
Sorry, there is no other way. Maybe through a future extension, but that’s not sure at the moment.
Not sure for the moment ? Where can I find out some information about this ? I made a topic for that in the other forum but didn’t have anything back.
although always 3 vertices are the same.
in XIS for instance…
if u create a cube… u get automaticly hard edges but only 8 “points”… is “points” some kind of convention for shared vertices?
thx for your answer, it will save me a lot of time!
No, “points” is no convention for shared vertices. It’s a convention for a one-dimensional, infinitely small position in a given room (1D, 2D, 3D, …).
Anyway, what you ask for, cannot be done in OpenGL. And even if it seems, that certain programs handle things like this (Modeller tools…), they still need to send duplicated data to the GPU for rendering. The user doesn’t need to know about that, for him it’s more practical to work with “shared” vertices.