3 ms·
You can definitely "bind data to primitives" and share vertices between triangles in OpenGL and that has always been possible ever since the first version of Op
by exDM69 12y ago
You can definitely "bind data to primitives" and share vertices between triangles in OpenGL and that has always been possible ever since the first version of OpenGL.
Are you talking about legacy OpenGL style glBegin/glVertex/glEnd? That hasn't been the preferred way of drawing ever, and since OpenGL 1.5 (circa 1999), vertex buffers are the way to go.
If you want to share vertices between triangles, you should build and index buffer and use glDrawElements* functions.
- hrjet 12y agoI meant to say "bind data to elements". It's been a while since I programmed in OpenGL so the terminology is shaky. I saw your other answer below too. I am not able to visualise how the duplicate data could affect caching postively. But anyway, I don't have deep knowledge about the hardware. And I didn't know other 3D APIs had the same problem. Thanks for mentioning that.