Jump to content
  • Advertisement

Archived

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

OrangyTang

Wrapping vertex arrays

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

How do you people go about wrapping vertex arrays up in some convinient form and/or class? At the moment i have a large amount of dynamic geometry rebuilt every frame which I want to use vertex arrays instead of immediate mode. Since the apps format is unsuitable to be bunged straight into a set of arrays, I was thinking of creating some sort of wrapper class to manage the colour/texcoord/vertex set of arrays, as well as the indices array. Then the data could be pushed to this object as it is generated, and once full the client state and glDrawElements could be called via some sort of .flush method in the wrapper object. Is this a suitable idea or do people typically wrap this kind of thing in other ways? My main problem is that i''ve got lots of little objects (currently fans and strips) which i want to batch together into one glDrawElements. Suggestions?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!