Results 1 to 2 of 2

Thread: Displaying polygons - how to? [Please read]

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    3

    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(tm), 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

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

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: Displaying polygons - how to? [Please read]

    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

Similar Threads

  1. How to read <p> in polygons
    By UNKLE in forum COLLADA
    Replies: 1
    Last Post: 07-28-2008, 04:56 PM
  2. Replies: 1
    Last Post: 02-21-2007, 11:40 PM
  3. Replies: 5
    Last Post: 12-09-2006, 10:08 AM
  4. To display of concave polygons, polygons containing holes
    By deepa in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-13-2004, 09:22 PM
  5. Replies: 2
    Last Post: 04-29-2002, 09:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean