将3d模型加载到OpenGL场景中

时间:2022-09-10 18:32:02

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.

我需要在我的项目中加载和存储3d模型,并在OpenGL场景中渲染它们。我可以选择要出口的型号。dwg、max、step和其他一些格式是可用的。刚刚发现OpenGL是低级API,不包含任何解析3d模型文件的工具。我正在寻找一些库/API来将一个3d文件结构转换成OpenGL原语(或其他原始数据),并将它们存储在具有指定格式的文件中。

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

例如,我想加载一个步骤文件,旋转并缩放一些对象,然后保存修改后的文件。

2 个解决方案

#1


10  

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

我认为Assimp可能是您正在寻找的:http://assimp.sourceforge.net/

#2


4  

C++ 3ds loader:

c++ 3 ds加载程序:

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

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

#1


10  

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

我认为Assimp可能是您正在寻找的:http://assimp.sourceforge.net/

#2


4  

C++ 3ds loader:

c++ 3 ds加载程序:

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

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