[opengl]shared vertexes

Started by
3 comments, last by riruilo 15 years, 6 months ago
Hy. Is possible in opengl to share vertexes that is utilized by two or more instance of the same skeleton mesh(the vertex are the same , but the animation position is not equal ) simil to directx? Thanks
Advertisement
You can create multiple instances from a single reference mesh. You need simply apply different transformation matrices for each instance.
Quote:Original post by songho
You can create multiple instances from a single reference mesh. You need simply apply different transformation matrices for each instance.


How i create these instances in opengl?
Using vbo?
You can do an example?

Thanks
Quote:Original post by giugio
How i create these instances in opengl?
Using vbo?

Yes, You can use VBOs. Just clarification, I didn't mean instantiating objects such as C++ or object-oriented programming. OpenGL only provides base APIs for drawing and transformation. You have to implement classes yourself if you want to wrap it nicely into classes in your programs.

Other ways to draw meshes are;
1. Immediate mode with glBegin()/glEnd() block.
2. Vertex Array
3. Display List

Quote:Original post by songho
Quote:Original post by giugio
How i create these instances in opengl?
Using vbo?

Yes, You can use VBOs. Just clarification, I didn't mean instantiating objects such as C++ or object-oriented programming. OpenGL only provides base APIs for drawing and transformation. You have to implement classes yourself if you want to wrap it nicely into classes in your programs.

Other ways to draw meshes are;
1. Immediate mode with glBegin()/glEnd() block.
2. Vertex Array
3. Display List


Display lists and inmediate mode are obsolete, don't use them.

A good scene graph would do what you say, instancing the same mesh several times with different transformations and animations.
I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time, like tears in rain. Time to die.

This topic is closed to new replies.

Advertisement