Multiple Vertex Arrays?
Hey everybody!
I''m trying to plow my way through the OpenGL red book, and I''ve stumbled onto something a bit odd. The book says that you can update/activate up to 6 arrays (Vertex, Color, Normal, Texture, etc). However, it does not say anything about having multiple arrays of the same type. What I mean is, is it possible to have one vertex array for my model, one vertex array for my landscape, and a third vertex array for say, a tree?
Thanks!
-SkyFire
P.S. Don''t worry, I''ve searched the board and noone has posted anything on this exact topic ^_~
___
Me:"Did you know that a duck''s quack won''t echo, and nobody knows why?"
Jackie:"What if it was a really large duck with a really loud quack? I bet it would echo"
I do real things with imaginary numbers
I''m sure you can only have one array of each type, so instead what you do is keep the geometry for each object seperate and then when you render, just put all the geometry into a single large array.
skyfire360: you can have any amount of any(vertex, normal,..)arrays.. there is no limit. But you can only have one set of arrays ACTIVE. (eg : one normal/textureUV/vertex array)
TheGilb : having one huge array is not always the best idea.. especialy with combining static/dynamic geometry
There are more worlds than the one that you hold in your hand...
TheGilb : having one huge array is not always the best idea.. especialy with combining static/dynamic geometry
There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
DarkWIng: Aah, so I would have to draw the elements before I set the array pointer to a new vertex array? Or am I misunderstanding?
___
Me:"Did you know that a duck''s quack won''t echo, and nobody knows why?"
Jackie:"What if it was a really large duck with a really loud quack? I bet it would echo"
___
Me:"Did you know that a duck''s quack won''t echo, and nobody knows why?"
Jackie:"What if it was a really large duck with a really loud quack? I bet it would echo"
I do real things with imaginary numbers
You can have multiple texture coordinate arrays (for multi-texturing). You select which texture unit you''re operating on before you pass the array for it. I don''t think any mechanism exists for multiple arrays of any other types, tho.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement