Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vrihai

OpenGL Single-mesh characters in OpenGL?

This topic is 5923 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

I''ve been using Direct3D for quite sometime, and been able make single-meshed characters pretty easily, with the help of vertex buffers. The question is, would you be able to make them in OpenGL without having to code your own transformation routine? I''m asking this because I''ve noticed some recent games that use OpenGL (Oni by Bungie for one) that doesn''t use single-meshes.

Share this post


Link to post
Share on other sites
Advertisement
quote:

The question is, would you be able to make them in OpenGL
without having to code your own transformation routine?


Sure. Just put the whole model in one big vertex array, and render the different subsets of the mesh using separate glDrawElement calls (glVertexPointer et. al is just set once at the beginning on the global vertex pool of your character). Don''t forget to push/pop the transformation matrices accordingly.

You could also render the whole model in one single glDrawElement call (better performance), but you''ll need vertex programs/shaders for that (in order to specify multiple simultaneous modelview matrices).

/ Yann

Share this post


Link to post
Share on other sites

  • 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!