|
-
Jun 5th, 2002, 06:03 PM
#1
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
-
Jun 5th, 2002, 06:27 PM
#2
Frenzied Member
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."
-
Jun 6th, 2002, 12:55 AM
#3
Rephrase the question, please.
Z.
-
Jun 6th, 2002, 08:19 AM
#4
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.
-
Jun 6th, 2002, 01:25 PM
#5
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?
-
Jun 6th, 2002, 04:08 PM
#6
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.
-
Jun 6th, 2002, 06:48 PM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|