Results 1 to 7 of 7

Thread: Using OpenGL

  1. #1
    NOMADMAN
    Guest

    Using OpenGL

    Is it easier/memory efficent to load a 3d model from a file or 3 or 4 primitives that you keep together?

    NOMAD

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    If I were you I'd look at http://nehe.gamedev.net and/or post the question at www.gamedev.net
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Zaei
    Guest
    Rephrase the question, please.

    Z.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Well, that depends on the model. Of course 3-4 primitives use less memory, but you need a few hundred to be comparable to even a simple model.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    NOMADMAN
    Guest

    Rephrase

    This is the situation. I'm getting into 3D programming, I have a good book on OpenGl so I'll use that. I want to have blockes (cubes) in my game. It would look better if the blocks had beveled edges. I wanted to know if I made 6 trapizoids and put them together to make a beveled edge or import a model. Or would it be a magnitude easier to just have simple cubes?

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Cubes are the easiest. I don't know how hard loading a model in OpenGL is, depending on that it would be easier to have a few primitives or a model.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Zaei
    Guest
    Its easier to load a model. The hard part is getting your model into an easy to read in format. For that you need a converter from some other modeling package.

    For the loading itself, it is very easy. You simple have a list of vertices in the file, plus a number describing the number of vertices in the file. You allocate enough space in memory for each vertex, and then read them from the file and into memory. You then iterate through the list, and call glVertex3f() for each one, plus a glColor3f(), etc.

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width