将模型导入 OpenGL 项目 [英] Importing Models Into A OpenGL Project

查看:30
本文介绍了将模型导入 OpenGL 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 OpenGL 课程,我们可以选择使用 3D 建模应用程序(如 Maya 或 Blender)创建模型以在我们的作业中使用.

I am taking an OpenGL course and we have the option to create models to use in our assignments with a 3D modeling application, like Maya or Blender.

期待手动输入坐标,所以我很好奇我应该寻找哪些资源来编写 OpenGL 代码和导入模型.(纹理稍后出现).我也担心我正在导入的规模,但在这一点上担心可能很愚蠢.

I am not looking forward to typing in coordinates manually so I was curious what resources I should be looking into for writing OpenGL code and importing models. (Textures are coming later). I am also concerned by the scale I'm importing at but maybe that's silly to worry about at this point.

感谢您提供任何资源建议.OpenGL 有很多东西,当我在谷歌上搜索我需要的东西时,我有时会不知所措.

Thanks for any resource suggestions. OpenGL has so much out there I get overwhelmed sometimes when Googling for what I need.

这就是我最终使用的.http://www.spacesimulator.net/tut4_3dsloader.html我下载了Windows"版本,并对包含的路径进行了一些更改,然后启动并运行.它不处理 OBJ 文件,而是处理 3DS.Cheetah 3D 也导出到这种类型.

This is what I ended up using. http://www.spacesimulator.net/tut4_3dsloader.html I downloaded the "Windows" version and with a few path changes to the includes, got up and running. It doesn't handle OBJ files but rather 3DS. Cheetah 3D exports to this type as well.

推荐答案

Blender 可以将文件保存为 .obj 格式,一个简单的谷歌搜索就会找到几个用于将其加载到 OpenGL 的库.这里就是其中之一.

Blender can save files in .obj format, and a simple google search turns up several libraries for loading this into OpenGL. Here is one.

这篇关于将模型导入 OpenGL 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆