import model to OpenGL project

I’m a green hand.And I want to know how to import 3D models from *.max file to my OpenGL project?Kindly help me.

I see black. .max is a proprietary file-format which makes it pretty difficult to use in other applications.
You’ll have to export something from max that is more readable for others, preferrably something where you already
have a library that takes care of importing and managing the models: OpenGL does not define any mesh or model-structures.
Alternatively you can write your own modelling-stuff for GL and write an export-plugin for Max.

[QUOTE=hlewin;1247478]I see black. .max is a proprietary file-format which makes it pretty difficult to use in other applications.
You’ll have to export something from max that is more readable for others, preferrably something where you already
have a library that takes care of importing and managing the models: OpenGL does not define any mesh or model-structures.
Alternatively you can write your own modelling-stuff for GL and write an export-plugin for Max.[/QUOTE]

Thank you.So I should try to know what’s the storage structure of .max file.And use library to extract vertexs position and design my structure for OpenGL to use.Is that right?

If you manage to do so. I googled a while ago for a .max-importer for Milkshape without success. I take this as a sign of that not being too easy. The file-Format may Change with the max-versions if you’re unlucky. If you have Access to 3d-studio or the Artist exporting the models in the ASCII-Format would make figuring things out much more easy. If you are to try to Import the binaries, maybe a look on some ASCII-exports and/or an importer for those might make things easier.
I do not quite know what your question is aiming on: You would Need to figure out how .max-files are organized, yes. Such things can, as said, be quite tedious. If you manage to do so, you would some auxillary libraries to manage Image loading for textures and maybe some math-library to handle the Import of animation-keyframes etc. (I do not really know how those are stored in .max).
That’s the importer-side of things.
You will, of course, Need to define data-structures to use throughout your Project to deal with meshes, textures, keyframes and so on. OpenGL does not define anything directly usable.

[QUOTE=hlewin;1247489]If you manage to do so. I googled a while ago for a .max-importer for Milkshape without success. I take this as a sign of that not being too easy. The file-Format may Change with the max-versions if you’re unlucky. If you have Access to 3d-studio or the Artist exporting the models in the ASCII-Format would make figuring things out much more easy. If you are to try to Import the binaries, maybe a look on some ASCII-exports and/or an importer for those might make things easier.
I do not quite know what your question is aiming on: You would Need to figure out how .max-files are organized, yes. Such things can, as said, be quite tedious. If you manage to do so, you would some auxillary libraries to manage Image loading for textures and maybe some math-library to handle the Import of animation-keyframes etc. (I do not really know how those are stored in .max).
That’s the importer-side of things.
You will, of course, Need to define data-structures to use throughout your Project to deal with meshes, textures, keyframes and so on. OpenGL does not define anything directly usable.[/QUOTE]

Thanks for hlewin’s answer.And i have known the things I should learn after reading the answer.That helps alot.

One such library you might consider is Assimp. Here’s the list of supported input formats.

Thanks,that helps a lot!:smiley: