Jump to content

  • Log In with Google      Sign In   
  • Create Account


Vertex array question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Qoy   Members   -  Reputation: 127

Like
Likes
Like

Posted 31 July 2001 - 09:30 AM

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

Sponsor:

#2 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 31 July 2001 - 10:49 AM

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
}




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS