# OpenGLStudy **Repository Path**: study_less_shape/OpenGLStudy ## Basic Information - **Project Name**: OpenGLStudy - **Description**: 学习opengl的仓库 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2022-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OpenGLStudy ---------------------- 跟随[LearnOpenGLCN](https://learnopengl-cn.github.io/)学习OpenGL的代码 教程中提到的/用到的库和使用到的软件 - [GLFW](https://www.glfw.org/download.html) > 选择`Sourcepackage`下载 - [Cmake](https://cmake.org/download/) - [stb_image.h(国内gitee)](https://gitee.com/mirrors/stb-image/blob/master/stb_image.h) - [GLAD在线服务](https://glad.dav1d.de/) > 原文:打开GLAD的[在线服务](http://glad.dav1d.de/),将语言(Language)设置为**C/C++**,在API选项中,选择**3.3**以上的OpenGL(gl)版本(我们的教程中将使用3.3版本,但更新的版本也能正常工作)。之后将模式(Profile)设置为**Core**,并且保证**生成加载器**(Generate a loader)的选项是选中的。现在可以先(暂时)忽略拓展(Extensions)中的内容。都选择完之后,点击**生成**(Generate)按钮来生成库文件。 - ![GLMico](https://learnopengl-cn.github.io/img/01/07/glm.png)[GLM](https://glm.g-truc.net/0.9.8/index.html) [github](https://github.com/g-truc/glm/tags) > - GLM是Open**GL M**athematics的缩写,它是一个**只有头文件**的库,也就是说我们只需包含对应的头文件就行了,不用链接和编译。 > - GLM库从0.9.9版本起,默认会将矩阵类型初始化为一个零矩阵(所有元素均为0),而不是单位矩阵(对角元素为1,其它元素为0)。如果你使用的是0.9.9或0.9.9以上的版本,你需要将所有的矩阵初始化改为`glm::mat4 mat = glm::mat4(1.0f)`。如果你想与本教程的代码保持一致,请使用低于0.9.9版本的GLM,或者改用上述代码初始化所有的矩阵。 > - 我们需要的GLM的大多数功能都可以从下面这3个头文件中找到: ```c++ {.line-numbers} #include #include #include ```