Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading 3d model into OpenGL scene [closed]

Tags:

c++

qt

api

opengl

I need to load and store 3d models in my project and render them in an OpenGL scene. I can choose type of models to be exported. dwg, max, step and some other formats are available. Just found that OpenGL is low-level API and does not contain any facilities to parse 3d model files. I'm looking for some library/API to translate a 3d file structure into OpenGL primitives (or some other raw data) and store them back in a file with specified format.

For example I would like to load a step file, rotate and scale some objects, and then save modified file.

like image 713
sorush-r Avatar asked Apr 12 '12 17:04

sorush-r


People also ask

How do I read 3D files in OBJ?

Just install the software OBJ Viewer To begin viewing 3D files, simply do the following Install the extension OBJ Viewer Click on the extension icon Choose the 3D file you wish to open Begin viewing your 3D files online today! This 3D viewer works for both STL and OBJ file formats.

What is OpenGL 3D?

OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.


2 Answers

I think that Assimp could be what you are looking for: http://assimp.sourceforge.net/

like image 64
Samuel Gosselin Avatar answered Sep 18 '22 12:09

Samuel Gosselin


C++ 3ds loader:

http://www.spacesimulator.net/wiki/index.php?title=Tutorials:3ds_Loader

like image 28
tetris Avatar answered Sep 18 '22 12:09

tetris