1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 04:35:28 +08:00

认领《Depth testing》

This commit is contained in:
Geequlim
2015-06-15 18:03:48 +08:00
parent 57878e4970
commit ef048383cb
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
本文作者JoeyDeVries由Geequlim翻译自[http://learnopengl.com](http://learnopengl.com/#!Getting-started/Hello-Window)
上一节中我们获取到了GLFW和GLEW这两个开源库现在我们就可以使用它们来我们创建一个OpenGL绘图窗口了。首先新建一个 .cpp文件然后把下面的代码粘贴到该文件的最前面。注意为之所以定义GLEW_STATIC宏是因为我们使用GLEW的静态链接库。
// GLEW
#define GLEW_STATIC
#include <GL/glew.h>
// GLFW
#include <GLFW/glfw3.h>
> Be sure to include GLEW before GLFW. The include file for GLEW contains the correct OpenGL header includes (like GL/gl.h) so including GLEW before other header files that require OpenGL does the trick.
> 请确认在包含GLFW头文件之前包含了GLEW

View File

@@ -0,0 +1,3 @@
本文作者JoeyDeVries由unnamed翻译自[http://learnopengl.com](http://learnopengl.com/#!Advanced-OpenGL/Depth-testing)
##深度测试