View Full Version : vertex buffer objects and elded vs unwelded vertic

04-05-2011, 08:52 PM

Being a newbie to OpenGL (and not yet into shaders), I wonder if anyone can tell me if my thinking on VBO's and the use of welded (shared) vertices vs unwelded vertices in models is correct.

If I use welded vertices with VBOs, then the advantages are:
1/ Less memory space is used on the card.
2/ Vertex array normals for shared vertices are algorithmically easier to compute.

The disadvantages are:
1/ Textures are harder to render correctly because texture coordinates are shared by vertices.

And a general comment...
1/ There is no speed advantage using welded vertices since the number of vertices drawn is the same whether vertices are welded or unwelded.

So...if the above is fairly correct then I should use unwelded models where I'm using textures.

Alfonse Reinheart
04-05-2011, 09:34 PM
What do you mean by "welded vertices"? Are you talking about positions on the model that have more than one texture coordinate, normal, or other vertex attribute associated with them?

04-05-2011, 09:47 PM
A single vertex defined as part of more than one polygon. i.e., in a vertex buffer object the vertex is defined once in the vertex array, but indexed two or more times in the vertex Indices Array - so the vertex is shared by more than one polygon.

hope that makes more sense...

04-07-2011, 02:16 AM
Your assumption is correct. If you dont have textures, use welded vertices to conserve memory. If you do use textures, unweld some of them since the texture coordinates *may* differ. OpenGL has no concept of welding, this is strictly a modeling tool convention.

04-07-2011, 02:20 AM
Also, be careful with normals, they could be different from the "same" vertex sharing two faces, mainly for hard-angle models (like cubes).

For the texture coordinates, I don't see any reason that they could be different for the same vertex, since it will most certainly produce bad texture application.