-
object loader
Hi,
Can someone please advise me this:
I need a 3DS loader on Linux.
Objective:
To create a 3D walk-through application using OpenGL (in a very short duration).
Thanks.
-
Super Moderator
OpenGL Lord
Re: object loader
The "3DS loader" part has nothing to do with OpenGL.
Personnaly, I would just outsource the job to Romania
-
Senior Member
OpenGL Pro
Re: object loader
just google... everyone out there has written a 3ds loader
-
Re: object loader
http://lib3ds.sourceforge.net/
Lib3dsFile* myfile = lib3ds_file_load("MySuperModel.3ds");
Lib3dsMesh* miObjeto = lib3ds_file_mesh_by_name(myfile, "airplane");
Mesh objects have this members:
uint points;
uint faces;
uint texels//points = texels;
Lib3dsPoint* pointL;//vertex
Lib3dsFace* faceL;//indices
Copy this fields to your own arrays(I don't know why it doesn't work when i send them directly to VBOs);
If you are using VBOs:
glBufferData(GL_ARRAY_BUFFER, 3*sizeof(float)*points, myvertexarray, GL_STATIC_DRAW);//For the veretx, for the texels just change the pointer
glBufferData(GL_ELEMENT_ARRAY_BUFFER,3*sizeof(uint )*faces, myfacesarray,GL_STATIC_DRAW);
Then just call glDrawElements with indices to 0.
Bye
If you learn how to use the keyframe part, let me know
.
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