View Full Version : to many glvertex3f statements

08-03-2005, 12:23 PM
i have 10 pages of code with nothing but glvertex3f statements. it was 40 pages i reduced it by creating a list and using glcalllist. what would be a way to decrease the code even more.

once i can get some images for it its suppose to look like a race track.

Ehsan Kamrani
08-03-2005, 01:07 PM
Yes. You can reduce the code-Less then one page-and read the data from a text file. Most of the NeHe articles use from this manner: NeHe.gamedev.net

Hylke Donker
08-04-2005, 12:50 AM
You might wanna look at glDrawElements and glMultiDrawElements.
They use an array of indices to pick vertices from an vertex array.
This way you can use a vertex multiple times.