View Full Version : how to import a 3D model using opengl in my application
10-28-2005, 02:09 AM
I am using a simulation software( in c++ )for fly through. Now i want to import a 3D model(a joystick model) into my application using opengl.Furhter i would like to know can i able to give any orientations to the model.
Opengl will not import the model directly, but there are libraries and routines out there on the net that will do it for you.
It depends on which format your model is in, but there are libraries for importing objects in 3DS format, etc. Do a Google for '3ds library' and you will find what you're looking for.
As for applying rotations, you simply need to use the 'glRotatef' command as part of your drawing routines, to apply your rotations to the modelview matrix.
Again, do a Google for 'OpenGL Red Book' to find out more about applying transormations and rotations to your objects.
using the x3d or VRML97 format is quite easy since those fileformats are easy to read :) . Those formats can normally be exported by any good 3dModelling software.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.