Thread: OpenGL GLUT 3D?

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    100

    OpenGL GLUT 3D?

    I've been learning GLUT/OpenGL for the last few days doing simple stuff like 3D cubes and the like... but i was thinking... how do you make complex objects... is there a file format i can use? how is it done?


    thanks

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    well first you find the format definition, then the rest should be obvious, just read whats there(this can be very complex)...

    http://www.wotsit.org look for some formats
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    100
    ok... im looking at .OBJ... but how do i use that source with glut?

    thanks

  4. #4
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    read over the format and see how the data relates to points, and polygons, texture ect...

    use the data in the file to draw them like you would normally draw the objects,


    like a polygon, maybe
    depending on how your(the) code orginizes the data for drawing,

    Code:
    for(int i = 0; i < number of polygons;i++)
    {
        glBegin(GL_POLYGON);
            for(int j = 0;j < number of polygon vertices;j++)
                 glVertex3fv(polygon[i].polygonvertice[j]);
        glEnd();
    }
    keep in mind this is just an example.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  5. #5
    Registered User
    Join Date
    May 2002
    Posts
    100
    Thanks a lot... now i get it... thanks

  6. #6
    Registered User
    Join Date
    May 2002
    Posts
    100
    Does anyone perfer any 3d object file types that are easy? And have textures? thanks

  7. #7
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    im not really sure as to what most popular, .3ds?

    i used .lwo 's since LightWave is what i need to use for my purposes... im still working on the loader for them, fairly close now, it's a pretty complex format. and then theres still the LightWave scene format...

    try asking the guru's at http://www.opengl.org , they might be able to helpm more.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  8. #8
    In The Light
    Join Date
    Oct 2001
    Posts
    598
    howdy,
    you can also try asking at
    Openglforums

    M.R.
    I don't like you very much. Please post a lot less.
    Cheez
    *and then*
    No, I know you were joking. My point still stands.

  9. #9
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    .md2 and .ms3d are the easiest to code for (.md2 is the Quake II file format and .ms3d is produced by the shareware program Milkshape 3d). If you go to http://nehe.gamedev.net/ you will find tutorials in both of these formats.
    VC++ 6

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Shininess lighting GLUT OpenGL
    By Zishaan in forum Game Programming
    Replies: 1
    Last Post: 04-22-2007, 08:30 PM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. errors with opengl & glut in windows
    By korbitz in forum Game Programming
    Replies: 12
    Last Post: 03-14-2004, 02:54 PM
  4. SDL or GLUT for Opengl?
    By drdroid in forum Game Programming
    Replies: 1
    Last Post: 07-17-2003, 01:54 AM
  5. Deep Exploration, OpenGL, and 3d models
    By DavidP in forum Game Programming
    Replies: 18
    Last Post: 04-06-2003, 01:12 PM