A simple opengl way to load objects(x, 3ds)?

[QUOTE]
Well i used to program directx, now then i used *.x files as models which i built in 3d studio max r3.
But does anybody know a simple way to load and display an x or 3ds file.
Does opengl maybe also have a meshbuilder?

Thnaks for any help
-your starnut coder

OpenGL doesn’t have any high level stuff like the old DirectX Retained Mode. Your best bet is to get a program called 3D Exploration and use it to export a model to OpenGL .cpp files. This usually works pretty good, but remember to select Tools|Convert To Double Sided.

export your objects to .ASE and parse the
data into your program

Thanks that works fine i got the program View3ds its great.

I usually use my own translator to convert STL files to OpenGL code. The only problem is that STL files do not have information about color, animation, etc. They just have the triangulated mesh. Then I have to assign those variables when I am programming. Too bad OpenGL does not have a MeshBuilder like DirectX…

opengl is no high-level api. it’s a low level api for doing the graphic and render stuff. the rest you have to do yourself

greetings,

Bastian.

If you want to render an *ase file, the simplest way is to build in your program four structures:
for exemple:

typedef struct {
float x,y,z;
} VERTEX;

typedef struct {
int A,B,C;
}FACE;

typedef struct{
int nvert;
VERTEX *point;
} OBJECT;

typedef struct{
int nobj;
OBJECT *object;
} SCENE;

after having declared these, read your ase file with the fonction strcmp and load each object,coordinate, face in yours structures… hope my help,
frog

Thanks i got objects in now.
Thanks for all youre help guys.

Could you please tell me where you found View3ds?
Thanks a lot

Alex

Sure i can send the program to you just mail me your email. Thanks