[opengl]shared vertexes
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
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 songhoQuote: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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement