Displaying polygons - how to? [Please read]

Alright… I understand how to map out your own polygons in OGL. However, lets say I made a model in 3d Studio MAX, how would I get OGL to recognize the model file, and/or the verticies/faces of it? I mean, I know how to map out individual polygons, 1 by 1, but that would take FOREVER to make a sophisticated model, typing out the location of every polygon. Is there a way to convert a raw model file into pure points so I can use that in OGL? Or better yet, have OGL recognize the actual file, and just display it in the program directly from that file.

Example of what I mean… say in the game Quake™, you see an enemy. I know John Carmack didn’t type out the location of every polygon for that character, instead he used ‘.mdl’ files to display it. I also know that you could make your own .mdl files and replace characters in the game. What I want to know is how to make the engine recognize those files (whether they are .mdl, .poof, .anything … you get my drift) and how to call them.

I’m sorry that I can’t really get across what I have in my head, I’m just a wee bit tired at the moment… hopefully someone out there understands what I’m saying and will reply by morning :slight_smile:

Anyways, thanks a lot for your time, see ya later.
-Spencer Quirk

You have to make a file parser for whatever fileformat you want to read. Put the info from the file into structures in your application. Then send those structures to OpenGL.

So basicly, you need to learn a fileformat. I think the easiest ones are in plain text, such as .ase files or wavefront .obj. You pretty much just need to look at one in a texteditor to figure out the fileformat. Or you can check out wotsit.org, has info on some fileformats.

Cheers