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?
Edited by - Qoy on July 31, 2001 4:35:47 PM