Jump to content
  • Advertisement

Archived

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

Qoy

Vertex array question

This topic is 6197 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'm writing a little framework to experiment with OGL functions, and I'm thinking about writing some kind of basic object type that would basically just hold vertex arrays, normal arrays, and texcoord arrays, along with a position representing the modelspace origin. Because everything I draw might not be using all the same types of arrays, and each object will have its own arrays, I figure before I need to draw an object I'll have to call a function with it to set the appropriate array pointers. The obvious solution is to have a function that enables and sets a pointer for each array that the object uses, and then a function for after drawing the object that disables the arrays, so they won't be polluted if the next object doesn't use the same types. However, I'm not that experienced with OGL yet, and so I don't have a good feel for what is slow and what is not. It is a bad idea in terms of performance to enable and disable the arrays before and after each object is drawn? Thanks! Edited by - Qoy on July 31, 2001 4:35:47 PM

Share this post


Link to post
Share on other sites
Advertisement
good idea what i do though is only set the arrays before you draw
ie
if (do i need colour array)
{
is ( colour arrays NOT enabled )
enable colour array
}
else
{
is (colour arrays enabled )
disable colour array
}

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!