Click to See Complete Forum and Search --> : Using OpenGL
NOMADMAN
Jun 5th, 2002, 06:03 PM
Is it easier/memory efficent to load a 3d model from a file or 3 or 4 primitives that you keep together?
NOMAD
HarryW
Jun 5th, 2002, 06:27 PM
If I were you I'd look at http://nehe.gamedev.net and/or post the question at www.gamedev.net
Zaei
Jun 6th, 2002, 12:55 AM
Rephrase the question, please.
Z.
CornedBee
Jun 6th, 2002, 08:19 AM
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.
NOMADMAN
Jun 6th, 2002, 01:25 PM
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?
CornedBee
Jun 6th, 2002, 04:08 PM
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.
Zaei
Jun 6th, 2002, 06:48 PM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.