Jump to content
  • Advertisement
Sign in to follow this  
Drazgal

Indexed Vertex Arrays with Offsets

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

What I want to be able to do is have an offset into my vertex array (and texture coords etc) that my index buffer would start drawing from when I call glDrawelements. For example DirextX it would be Device->DrawIndexedPrimitive(param,param,param,param,Startvertex,param) with StartVertex being the offset. If Im not using index arrays then its easy with the first parameter of glDrawArrays (the same for VBO) but for some reason I cant find anything on doing this with Indexed Vertex arrays. Im assuming its something very simple since I cant find anything on it. Can anyone give me a ndge in the right direction? Oh forgot to add, currently when I call glVertexPointer I just pass Array[Offset] right now but I have to do that for all the arrays I want to use. Is this the correct way of doing it? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Drazgal
Oh forgot to add, currently when I call glVertexPointer I just pass Array[Offset] right now but I have to do that for all the arrays I want to use. Is this the correct way of doing it?


In short, yes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!