Jump to content
  • Advertisement
Sign in to follow this  
giugio

OpenGL [opengl]shared vertexes

This topic is 3557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
You can create multiple instances from a single reference mesh. You need simply apply different transformation matrices for each instance.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!