Jump to content
  • Advertisement

Archived

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

WickedMystic

Vertex Arrays

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

Heya, I have a question about vertex arrays. Say I have a vertex-array containing 1000 vertices and another array which contains indices to the vertices. I know I can draw them using glDrawElements. Now I don't want to use OpenGL's 2D culling but I'd rather use my own culling routine which uses face-normals to determine if a face is visible. This way I dont have to transform vertices which aren't visible in the first place. My question is this: does OpenGL transform all the vertices in the vertex array or only the ones that are actually given in the array with the indices? Because that way I only have to 'rebuild' my array with indices and not the array which contains the vertices. If I have to rebuild both arrays(I dont really want to do that each frame), I also have to map the new indices onto the original ones etc etc. And this way I dont think it will be faster than just transforming all vertices and just do simple 2D face culling. WickedMystic Edited by - WickedMystic on 5/6/00 4:50:15 PM Edited by - WickedMystic on 5/6/00 4:51:33 PM

Share this post


Link to post
Share on other sites
Advertisement
Thanks to your posts I was courius to know what glDrawElements() do and how so I searched for it in my Visual C++ help but I really didn''t manage to understand how to use it. I only realised that it is involved with the use of glIndexPointer(), glNormalPointer(), glTexCoordPointer and glVertexPointer is it right ?

Could you possibly please explain me how to use it (may with a code example) ?

If you want to mail me, do it at tripuno@tiscalinet.it or just post your message here so your stuff could be freely readable to all people.

Thanks



Share this post


Link to post
Share on other sites
Magallo,

check these sites:

http://heron.cc.ukans.edu/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/@Generic__BookTocView/7109;cd=7;td=6

and

http://www.itknowledge.com/reference/archive/1571690735/ewtoc.html


WickedMystic

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!