How can I load geometry files, such as 3DS, OBJ, DEM, etc. and render them with OpenGL?
OpenGL, being a 3D graphics API, has no built-in support for reading application-specific file formats. If you’re writing an application that needs to read a specific file type, you’ll need to add code to support a particular file type. Many OpenGL users already have written code to do this, and in some cases, the code is available on the Web. A few are listed here. If you can’t find what you are looking for, you might try doing a Web search. This file format information covers a variety of different file formats. Okino’s PolyTrans can convert most major 3D file formats into OpenGL C code. Demos are available on their Web site. Crossroads can import many file formats and output the data as C/C++ compilable data that is suitable for use with vertex arrays. 3DWinOGL is shareware that reads in any file format and returns OpenGL primitive data. If you’re using 3D Studio MAX, you should see an export format called ASE, which is ASCII (i.e., large file sizes), but is very easy to parse. The