Archived

This topic is now archived and is closed to further replies.

Eric Boissard

3D file format, which one is the best ???

Recommended Posts

You dont say if you are using Retained mode or Immediate mode. But I can tell you this - The .x file format only works in the crappy Retained mode, so if you are using immediate mode, you will have to import your models from another format. I would personally reccomend .3ds because there is a lot of information about this format on the web.

Anyway
Good luck

Share this post


Link to post
Share on other sites
Thank you guys, but now i''ve got another question. About data structure and memory allocation. Is it a good idea to use linked list to store vertices and triangles? Is it better to declare pointers and allocate memory using Zeromemory() for example ?
I''m using immediate mode and Draw(Indexed)Primitive to render.
Could you tell me please a good way to organise my vertices and triangles.
If i use .x files, is it easy to access to normals (vertex and faces) ?
Help me please

Eric

Share this post


Link to post
Share on other sites
The way you organize the vertices depend only in the type of use that you what to give.
X format is very easy to use (Imode and retained). You only put the data into a memory. Or you can use the X-ascii format.

Trianglelist is the common, but you can try the another method (eg. "fan"..)



-eng3d.softhome.net-

Share this post


Link to post
Share on other sites
Guest Anonymous Poster


Hello Eng3d,

Do you know where I can find an example of code for loading X model with d3dx ?

Thanks

Dan


Share this post


Link to post
Share on other sites
My directx7 book mentions and uses a very simple class called :
CD3DFile which is declared in d3dfile.h to load x files. It says it is part of the directx7 sdk but not very well documented. You might want to check it out at the msdn or something...but its so simple it is like this i believe:

CD3DFile* car = NULL;
car = new CD3DFile();
car->Load("car.x");
car->Scale(2.0);
car->Render(gLPDevice);


where gLPDevice is your LPDIRECT3DDEVICE7 object.

Hope this helps you!

-blide
blide@mail.com

Share this post


Link to post
Share on other sites