Skip to content

Latest commit

 

History

History
136 lines (115 loc) · 7.28 KB

File metadata and controls

136 lines (115 loc) · 7.28 KB

FAQ 常见问题 I have compiled the tutorials, but it fails at startup. What’s going on ? 我已编译了教程,但是它在启动的时候就失败了。怎么回事? Incompatible GPU/OS 不兼容的GPU/OS Wrong working directory 错误的工作目录 No VAO 没有顶点数组对象(VAO) GLEW bug GLEW错误 CMake CMake Why should I use OpenGL 3.3 if Intel and Mac can’t run it ?! 如果Intel和Mac电脑都不支持OpenGL 3.3,为什么还要用它? I’ve got error “Unable to start program ALL_BUILD” 遇到错误“Unable to start program ALL_BUILD” I’ve got a message about the working directory, and the program crashes. 有关于工作目录的信息,同时程序崩溃 About sending e-mails… 关于发邮件

I have compiled the tutorials, but it fails at startup. What’s going on ? 我已编译了教程,但是它在启动的时候就失败了。怎么回事? Several possible reasons : 若干个可能的原因:

Incompatible GPU/OS 不兼容的GPU/OS Please check if you have an Intel card. You can do so using glewinfo, GPU Caps Viewer, or any other tool. 请检查是否有英特尔显卡。可以通过glewinfo, GPU Caps Viewer或者任何其他工具来检查。 Intel cards, except recent HD4000, don’t support OpenGL 3.3. As a matter of fact, most only support OpenGL 2.1. You have to download the 2.1 version from the Downloads page instead. 除了最近的HD4000外,其他的英特尔显卡都不支持OpenGL 3.3.实际上,大部分都只支持OpenGL 2.1.需要的话在下载页面下载2.1版本的。 The other possible reason is that you’re on a Mac, with a pre-Lion version. Same stuff applies… 另外一个可能的原因是你在Mac电脑上,用的pre-Lion版本。相同的解决办法适用。

Wrong working directory 错误的工作目录 Chances are that you don’t run them from the right directory. Try double-clicking on the .exe from the explorer. 很可能是你没有从正确的目录下启动运行。试着从浏览器双击.exe。 See Tutorial 1 for configuring the IDE so that you can debug the executable. 查看第一课中配置IDE的内容,从而你可以调试可执行文件。

No VAO 没有顶点数组对象(VAO) If you created a program from scratch, make sure you created a VAO : 如果你从头创建一个项目,请确保创建了一个顶点数组对象: GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID);

GLEW bug GLEW错误 GLEW has a bug which make it impossible to use a core context (except when you use the source code from the tutorials, which has been fixed). 3 solutions: GLEW有一个错误,会导致它不能使用核心上下文(除非你直接使用教程提供的已经修正过的源码)。三个解决方案: Ask GLFW for a Compatibility Profile instead: 向GLEW询问一个兼容性属性来替代: glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE); 使用glewExperimental;这是推荐的办法: Use glewExperimental; this is the recommended way: glewExperimental = true; Actually fix glew… See this patch. 修正glew...看这里

CMake CMake You did read Tutorial 1, right ? You didn’t try to write your own makefile and build everything yourself, RIGHT ? 已经阅读过第一课,是吧?没有尝试去写你自己的makefile文件,然后建立所有的文件,是吧?

Why should I use OpenGL 3.3 if Intel and Mac can’t run it ?! 如果Intel和Mac电脑都不支持OpenGL 3.3,为什么还要用它? (not actually a FAQ, but worth being discussed) (这实际上并不是一个常见问题,但还是值得被讨论) As a matter of fact, I don’t recommend using OpenGL 3.3 for an application. I use it in the tutorials because it’s the clean way to learn OpenGL, without all the deprecated stuff, and because once you know 3.3, using 2.1 is straighforward. 事实上,我不推荐把OpenGL3.3运用到一个应用程序中。在教程中使用它是因为这是一个清晰的方式去学习OpenGL,没有任何弃用的东西,也因为一旦你知道3.3版本,再使用2.1就很直观了。 What I recommend is : 我推荐的是: Learn in OpenGL 3.3 so that you know the “right way” 用OpenGL3.3来学习,因此你能明白使用OpenGL正确的方式 Set a target hardware for your application. For instance, require FBOs and GLSL. 为你的应用程序设定基础硬件条件。比如说,要求FBOs和GLSL。 Use GLEW to load all the extensions. At startup, refuse all hardware which hasn’t the required functionality level. 使用GLEW来装入所有的扩展。在开始时,对于所有不能达到要求的硬件条件全部否决掉。 From now on, you can code almost like if you were on 3.3, with only a few changes. 从现在开始,你几乎可以像在3.3版本上写代码一样,只有几个小变化。 If you really want to deal with older/cheaper hardware , you can still deal with them by disabling effects which require FBOs, for instance. 如果你确实想在更老/更廉价的硬件条件下工作,仍然可以不使用3.3版本的一些效果来做到,比如一些需要FBOs的效果。

I’ve got error “Unable to start program ALL_BUILD” 遇到错误“Unable to start program ALL_BUILD” ALL_BUILD is just a helper project generated by CMake; it’s not a real program. ALL_BUILD仅仅是由CMake生成的一个帮助工程;它不是一个真正的程序。 As stated in Tutorial 1, you have to select the project you want to run by right-clicking on a project (from inside Visual) and select “Set up as startup project”, like this : 就像在第一课中讲到的,需要选择想要运行的工程,右击那个工程(从Visual里),然后选择“Set up as startup project”,像这样:

I’ve got a message about the working directory, and the program crashes. 有关于工作目录的信息,同时程序崩溃 You have to start the program from tutorial01_first_window/, tutorial02_red_triangle/, etc. If you start the program from your IDE, you have to configure it from him to do so. 你需要从tutorial01_first_window/, tutorial02_red_triangle/等等里打开程序。如果你从自己的IDE打开程序,那么也要在该IDE里配置该程序。 Please read Tutorial 1 for details. 更多细节请查看第一课教程。

About sending e-mails… 关于发邮件... Sending an e-mail to contact@opengl-tutorial.org is the most effective way to get support. However, if you have a problem, please include as much information as you can. This means at least : OS : Gentoo ? Windows XP ? … (remember : use the 2.1 port if you have a mac !) 32 bits or 64 bits ? Graphic card : NVIDIA ? AMD ? Intel ? S3 ? Matrox ? (remember : use the 2.1 port if you have an integrated GPU !) … and optionally any other information you can find useful. This may include : GPU Driver version Call stack screenshots console output minidump… 发送邮件到opengl-tutorial.org是得到支持的最有效方式。当然,如果你有任何问题,请提供尽可能多的信息。至少包括: 操作系统: Gentoo ? Windows XP ? … (记住:如果在mac上请使用2.1版本!) 32位还是64位? 显卡: NVIDIA ? AMD ? Intel ? S3 ? Matrox ? (记住:如果只有集成GPU请使用2.1版本!) ...还有任何其他你觉得有用的信息,这也许包括: GPU驱动版本 调用栈 截图 控制台输出 小存储器转储文件