View Full Version : Indexed Vertex Arrays
07-11-2001, 03:04 AM
Can I upload all my vertices into the AGP memory and then specify polygons vertex indicies into each array after frustum culling? So intead of drawing the whole array, just a few polys from each array?
If so; can I send in the inidicies per polygon or will that be immensly slow?
Maybe I could create an vertex index list from the per material buffers I have and when rendering create an long IndexArray and send it to OpenGL.
Now I draw each poly using immidiate mode.
Anyone have any tips?
Rob The Bloke
07-12-2001, 04:35 PM
Look at vertex arrays, compiled vertex arrays, vertex array range .... Let the hardware do the culling - Faster than working out in your code what needs to be drawn. (except maybe using BSP trees or some other culling system - depends if your talking about a large level, or just a high poly model)
07-12-2001, 09:48 PM
Im basically wondering if I can combine my own culling (in an Octtree) with rendering with Vertex Arrays of some sort.
The world will be a big world with many different meshes, not a single big one.
I could load each mesh in the current sector into memory, but how do I render only the ones that are visible to OpenGL?
I plan to try and implement this, but I have no OpenGL card here, will get back home in August to try it.
All I read about VA dont explain it clearly for me.
07-13-2001, 02:59 AM
I'm not sure I understand what you're trying to say. If you want to use your own cullling, just don't send the stuff that gets culled toi OpenGL. Where those vertices are stored doesn't really matter, as long as you don't tell OpenGL to render them. Also, remember that index arrays are stored in system memory, not AGP.
07-13-2001, 03:06 AM
Hmmm, it sounds like you are doing a terrain type thing. Basically test youre within the drawing loop. If they are within frustrum, execute drawing commands, if they are not then don't. You can also use a tile based system like I am, where you have a block(tile) of the vertexes and if that block falls out of the frustrum then just don't pass the array for the block. Make any sense to you??
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.