Vertex Arrays
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
Use glDrawElements() and you only have to rebuild the indices array.
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.stGA
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement