diff --git a/docs/01 Getting started/01 OpenGL.md b/01 Getting started/01 OpenGL.md similarity index 83% rename from docs/01 Getting started/01 OpenGL.md rename to 01 Getting started/01 OpenGL.md index 42aa4d5..f3f9002 100644 --- a/docs/01 Getting started/01 OpenGL.md +++ b/01 Getting started/01 OpenGL.md @@ -1,4 +1,4 @@ -# OpenGL +# OpenGL (Open Graphics Library) 原文 | [OpenGL](http://learnopengl.com/#!Getting-started/OpenGL) ---|--- @@ -21,9 +21,9 @@ OpenGL规范严格规定了每个函数该如何执行,以及它们的输出 所有版本的OpenGL规范文档都被公开的寄存在Khronos那里。有兴趣的读者可以找到OpenGL3.3(我们将要使用的版本)的[规范文档](https://www.opengl.org/registry/doc/glspec33.core.20100311.withchanges.pdf)。如果你想深入到OpenGL的细节(只关心函数功能的描述而不是函数的实现),这是个很好的选择。如果你想知道每个函数**具体的**运作方式,这个规范也是一个很棒的参考。 -## 核心模式与立即渲染模式 +## 核心模式(Core-profile)与立即渲染模式(Immediate mode) -早期的OpenGL使用**立即渲染模式**(Immediate mode,也就是**固定渲染管线**),这个模式下绘制图形很方便。OpenGL的大多数功能都被库隐藏起来,开发者很少能控制OpenGL如何进行计算的自由。而开发者迫切希望能有更多的灵活性。随着时间推移,规范越来越灵活,开发者对绘图细节有了更多的掌控。立即渲染模式确实容易使用和理解,但是效率太低。因此从OpenGL3.2开始,规范文档开始废弃立即渲染模式,推出核心模式(Core-profile),这个模式完全移除了旧的特性。 +早期的OpenGL使用**立即渲染模式**(也就是**固定渲染管线**),这个模式下绘制图形很方便。OpenGL的大多数功能都被库隐藏起来,开发者很少能控制OpenGL如何进行计算的自由。而开发者迫切希望能有更多的灵活性。随着时间推移,规范越来越灵活,开发者对绘图细节有了更多的掌控。立即渲染模式确实容易使用和理解,但是效率太低。因此从OpenGL3.2开始,规范文档开始废弃立即渲染模式,推出核心模式,这个模式完全移除了旧的特性。 当使用OpenGL的核心模式时,OpenGL迫使我们使用现代的函数。当我们试图使用一个已废弃的函数时,OpenGL会抛出一个错误并终止绘图。现代函数的优势是更高的灵活性和效率,然而也更难于学习。立即渲染模式从OpenGL**实际**运作中抽象掉了很多细节,因而它易于学习的同时,也很难去把握OpenGL具体是如何运作的。现代函数要求使用者真正理解OpenGL和图形编程,它有一些难度,然而提供了更多的灵活性,更高的效率,更重要的是可以更深入的理解图形编程。 @@ -35,11 +35,11 @@ OpenGL规范严格规定了每个函数该如何执行,以及它们的输出 当使用新版本的OpenGL特性时,只有新一代的显卡能够支持你的应用程序。这也是为什么大多数开发者基于较低版本的OpenGL编写程序,并只提供选项启用新版本的特性。 -在有些教程里你会看见更现代的特性,它们同样会以这种红色注释方式标明。 +在有些教程里你会看见更现代的特性,它们同样会以这种橙色注释方式标明。 -## 扩展 +## 扩展(Extension) -OpenGL的一大特性就是对扩展(Extension)的支持,当一个显卡公司提出一个新特性或者渲染上的大优化,通常会以**扩展**的方式在驱动中实现。如果一个程序在支持这个扩展的显卡上运行,开发者可以使用这个扩展提供的一些更先进更有效的图形功能。通过这种方式,开发者不必等待一个新的OpenGL规范面世,就可以使用这些新的渲染特性了,只需要简单地检查一下显卡是否支持此扩展。通常,当一个扩展非常流行或者非常有用的时候,它将最终成为未来的OpenGL规范的一部分。 +OpenGL的一大特性就是对扩展的支持,当一个显卡公司提出一个新特性或者渲染上的大优化,通常会以**扩展**的方式在驱动中实现。如果一个程序在支持这个扩展的显卡上运行,开发者可以使用这个扩展提供的一些更先进更有效的图形功能。通过这种方式,开发者不必等待一个新的OpenGL规范面世,就可以使用这些新的渲染特性了,只需要简单地检查一下显卡是否支持此扩展。通常,当一个扩展非常流行或者非常有用的时候,它将最终成为未来的OpenGL规范的一部分。 使用扩展的代码大多看上去如下: @@ -56,17 +56,17 @@ else 使用OpenGL3.3时,我们很少需要使用扩展来完成大多数功能,当需要的时候,本教程将提供适当的指示。 -## 状态机 +## 状态机(State Machine) -OpenGL自身是一个巨大的状态机(State Machine):一系列的变量描述OpenGL此刻应当如何运行。OpenGL的状态通常被称为OpenGL**上下文(Context)**。我们通常使用如下途径去更改OpenGL状态:设置选项,操作缓冲。最后,我们使用当前OpenGL上下文来渲染。 +OpenGL自身是一个巨大的状态机:一系列的变量描述OpenGL此刻应当如何运行。OpenGL的状态通常被称为OpenGL**上下文(Context)**。我们通常使用如下途径去更改OpenGL状态:设置选项,操作缓冲。最后,我们使用当前OpenGL上下文来渲染。 假设当我们想告诉OpenGL去画线段而不是三角形的时候,我们通过改变一些上下文变量来改变OpenGL状态,从而告诉OpenGL如何去绘图。一旦我们改变了OpenGL的状态为绘制线段,下一个绘制命令就会画出线段而不是三角形。 当使用OpenGL的时候,我们会遇到一些**状态设置**函数(State-changing Function),这类函数将会改变上下文。以及**状态应用**函数(State-using Function),这类函数会根据当前OpenGL的状态执行一些操作。只要你记住OpenGL本质上是个大状态机,就能更容易理解它的大部分特性。 -## 对象 +## 对象(Object) -OpenGL库是用C语言写的,同时也支持多种语言的派生,但其内核仍是一个C库。由于C的一些语言结构不易被翻译到其它的高级语言,因此OpenGL开发的时候引入了一些抽象层。“对象(Object)”就是其中一个。 +OpenGL库是用C语言写的,同时也支持多种语言的派生,但其内核仍是一个C库。由于C的一些语言结构不易被翻译到其它的高级语言,因此OpenGL开发的时候引入了一些抽象层。“对象”就是其中一个。 在OpenGL中一个**对象**是指一些选项的集合,它代表OpenGL状态的一个子集。比如,我们可以用一个对象来代表绘图窗口的设置,之后我们就可以设置它的大小、支持的颜色位数等等。可以把对象看做一个C风格的结构体(Struct): @@ -81,7 +81,6 @@ struct object_name { !!! important **基元类型(Primitive Type)** - 使用OpenGL时,建议使用OpenGL定义的基元类型。比如使用`float`时我们加上前缀`GL`(因此写作`GLfloat`)。`int`、`uint`、`char`、`bool`等等也类似。OpenGL定义的这些GL基元类型的内存布局是与平台无关的,而int等基元类型在不同操作系统上可能有不同的内存布局。使用GL基元类型可以保证你的程序在不同的平台上工作一致。 当我们使用一个对象时,通常看起来像如下一样(把OpenGL上下文看作一个大的结构体): diff --git a/docs/01 Getting started/02 Creating a window.md b/01 Getting started/02 Creating a window.md similarity index 100% rename from docs/01 Getting started/02 Creating a window.md rename to 01 Getting started/02 Creating a window.md diff --git a/docs/01 Getting started/03 Hello Window.md b/01 Getting started/03 Hello Window.md similarity index 100% rename from docs/01 Getting started/03 Hello Window.md rename to 01 Getting started/03 Hello Window.md diff --git a/docs/01 Getting started/04 Hello Triangle.md b/01 Getting started/04 Hello Triangle.md similarity index 100% rename from docs/01 Getting started/04 Hello Triangle.md rename to 01 Getting started/04 Hello Triangle.md diff --git a/docs/01 Getting started/05 Shaders.md b/01 Getting started/05 Shaders.md similarity index 100% rename from docs/01 Getting started/05 Shaders.md rename to 01 Getting started/05 Shaders.md diff --git a/docs/01 Getting started/06 Textures.md b/01 Getting started/06 Textures.md similarity index 100% rename from docs/01 Getting started/06 Textures.md rename to 01 Getting started/06 Textures.md diff --git a/docs/01 Getting started/07 Transformations.md b/01 Getting started/07 Transformations.md similarity index 100% rename from docs/01 Getting started/07 Transformations.md rename to 01 Getting started/07 Transformations.md diff --git a/docs/01 Getting started/08 Coordinate Systems.md b/01 Getting started/08 Coordinate Systems.md similarity index 100% rename from docs/01 Getting started/08 Coordinate Systems.md rename to 01 Getting started/08 Coordinate Systems.md diff --git a/docs/01 Getting started/09 Camera.md b/01 Getting started/09 Camera.md similarity index 100% rename from docs/01 Getting started/09 Camera.md rename to 01 Getting started/09 Camera.md diff --git a/docs/01 Getting started/10 Review.md b/01 Getting started/10 Review.md similarity index 100% rename from docs/01 Getting started/10 Review.md rename to 01 Getting started/10 Review.md diff --git a/docs/02 Lighting/01 Colors.md b/02 Lighting/01 Colors.md similarity index 100% rename from docs/02 Lighting/01 Colors.md rename to 02 Lighting/01 Colors.md diff --git a/docs/02 Lighting/02 Basic Lighting.md b/02 Lighting/02 Basic Lighting.md similarity index 100% rename from docs/02 Lighting/02 Basic Lighting.md rename to 02 Lighting/02 Basic Lighting.md diff --git a/docs/02 Lighting/03 Materials.md b/02 Lighting/03 Materials.md similarity index 100% rename from docs/02 Lighting/03 Materials.md rename to 02 Lighting/03 Materials.md diff --git a/docs/02 Lighting/04 Lighting maps.md b/02 Lighting/04 Lighting maps.md similarity index 100% rename from docs/02 Lighting/04 Lighting maps.md rename to 02 Lighting/04 Lighting maps.md diff --git a/docs/02 Lighting/05 Light casters.md b/02 Lighting/05 Light casters.md similarity index 100% rename from docs/02 Lighting/05 Light casters.md rename to 02 Lighting/05 Light casters.md diff --git a/docs/02 Lighting/06 Multiple lights.md b/02 Lighting/06 Multiple lights.md similarity index 100% rename from docs/02 Lighting/06 Multiple lights.md rename to 02 Lighting/06 Multiple lights.md diff --git a/docs/02 Lighting/07 Review.md b/02 Lighting/07 Review.md similarity index 100% rename from docs/02 Lighting/07 Review.md rename to 02 Lighting/07 Review.md diff --git a/docs/03 Model Loading/01 Assimp.md b/03 Model Loading/01 Assimp.md similarity index 100% rename from docs/03 Model Loading/01 Assimp.md rename to 03 Model Loading/01 Assimp.md diff --git a/docs/03 Model Loading/02 Mesh.md b/03 Model Loading/02 Mesh.md similarity index 100% rename from docs/03 Model Loading/02 Mesh.md rename to 03 Model Loading/02 Mesh.md diff --git a/docs/03 Model Loading/03 Model.md b/03 Model Loading/03 Model.md similarity index 100% rename from docs/03 Model Loading/03 Model.md rename to 03 Model Loading/03 Model.md diff --git a/docs/04 Advanced OpenGL/01 Depth testing.md b/04 Advanced OpenGL/01 Depth testing.md similarity index 100% rename from docs/04 Advanced OpenGL/01 Depth testing.md rename to 04 Advanced OpenGL/01 Depth testing.md diff --git a/docs/04 Advanced OpenGL/02 Stencil testing.md b/04 Advanced OpenGL/02 Stencil testing.md similarity index 100% rename from docs/04 Advanced OpenGL/02 Stencil testing.md rename to 04 Advanced OpenGL/02 Stencil testing.md diff --git a/docs/04 Advanced OpenGL/03 Blending.md b/04 Advanced OpenGL/03 Blending.md similarity index 100% rename from docs/04 Advanced OpenGL/03 Blending.md rename to 04 Advanced OpenGL/03 Blending.md diff --git a/docs/04 Advanced OpenGL/04 Face culling.md b/04 Advanced OpenGL/04 Face culling.md similarity index 100% rename from docs/04 Advanced OpenGL/04 Face culling.md rename to 04 Advanced OpenGL/04 Face culling.md diff --git a/docs/04 Advanced OpenGL/05 Framebuffers.md b/04 Advanced OpenGL/05 Framebuffers.md similarity index 100% rename from docs/04 Advanced OpenGL/05 Framebuffers.md rename to 04 Advanced OpenGL/05 Framebuffers.md diff --git a/docs/04 Advanced OpenGL/06 Cubemaps.md b/04 Advanced OpenGL/06 Cubemaps.md similarity index 100% rename from docs/04 Advanced OpenGL/06 Cubemaps.md rename to 04 Advanced OpenGL/06 Cubemaps.md diff --git a/docs/04 Advanced OpenGL/07 Advanced Data.md b/04 Advanced OpenGL/07 Advanced Data.md similarity index 100% rename from docs/04 Advanced OpenGL/07 Advanced Data.md rename to 04 Advanced OpenGL/07 Advanced Data.md diff --git a/docs/04 Advanced OpenGL/08 Advanced GLSL.md b/04 Advanced OpenGL/08 Advanced GLSL.md similarity index 100% rename from docs/04 Advanced OpenGL/08 Advanced GLSL.md rename to 04 Advanced OpenGL/08 Advanced GLSL.md diff --git a/docs/04 Advanced OpenGL/09 Geometry Shader.md b/04 Advanced OpenGL/09 Geometry Shader.md similarity index 100% rename from docs/04 Advanced OpenGL/09 Geometry Shader.md rename to 04 Advanced OpenGL/09 Geometry Shader.md diff --git a/docs/04 Advanced OpenGL/10 Instancing.md b/04 Advanced OpenGL/10 Instancing.md similarity index 100% rename from docs/04 Advanced OpenGL/10 Instancing.md rename to 04 Advanced OpenGL/10 Instancing.md diff --git a/docs/04 Advanced OpenGL/11 Anti Aliasing.md b/04 Advanced OpenGL/11 Anti Aliasing.md similarity index 100% rename from docs/04 Advanced OpenGL/11 Anti Aliasing.md rename to 04 Advanced OpenGL/11 Anti Aliasing.md diff --git a/docs/05 Advanced Lighting/01 Advanced Lighting.md b/05 Advanced Lighting/01 Advanced Lighting.md similarity index 100% rename from docs/05 Advanced Lighting/01 Advanced Lighting.md rename to 05 Advanced Lighting/01 Advanced Lighting.md diff --git a/docs/05 Advanced Lighting/02 Gamma Correction.md b/05 Advanced Lighting/02 Gamma Correction.md similarity index 100% rename from docs/05 Advanced Lighting/02 Gamma Correction.md rename to 05 Advanced Lighting/02 Gamma Correction.md diff --git a/docs/05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md b/05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md similarity index 100% rename from docs/05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md rename to 05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md diff --git a/docs/05 Advanced Lighting/03 Shadows/02 Point Shadows.md b/05 Advanced Lighting/03 Shadows/02 Point Shadows.md similarity index 100% rename from docs/05 Advanced Lighting/03 Shadows/02 Point Shadows.md rename to 05 Advanced Lighting/03 Shadows/02 Point Shadows.md diff --git a/docs/05 Advanced Lighting/03 Shadows/03 CSM.md b/05 Advanced Lighting/03 Shadows/03 CSM.md similarity index 100% rename from docs/05 Advanced Lighting/03 Shadows/03 CSM.md rename to 05 Advanced Lighting/03 Shadows/03 CSM.md diff --git a/docs/05 Advanced Lighting/04 Normal Mapping.md b/05 Advanced Lighting/04 Normal Mapping.md similarity index 100% rename from docs/05 Advanced Lighting/04 Normal Mapping.md rename to 05 Advanced Lighting/04 Normal Mapping.md diff --git a/docs/05 Advanced Lighting/05 Parallax Mapping.md b/05 Advanced Lighting/05 Parallax Mapping.md similarity index 100% rename from docs/05 Advanced Lighting/05 Parallax Mapping.md rename to 05 Advanced Lighting/05 Parallax Mapping.md diff --git a/docs/05 Advanced Lighting/06 HDR.md b/05 Advanced Lighting/06 HDR.md similarity index 100% rename from docs/05 Advanced Lighting/06 HDR.md rename to 05 Advanced Lighting/06 HDR.md diff --git a/docs/05 Advanced Lighting/07 Bloom.md b/05 Advanced Lighting/07 Bloom.md similarity index 100% rename from docs/05 Advanced Lighting/07 Bloom.md rename to 05 Advanced Lighting/07 Bloom.md diff --git a/docs/05 Advanced Lighting/08 Deferred Shading.md b/05 Advanced Lighting/08 Deferred Shading.md similarity index 100% rename from docs/05 Advanced Lighting/08 Deferred Shading.md rename to 05 Advanced Lighting/08 Deferred Shading.md diff --git a/docs/05 Advanced Lighting/09 SSAO.md b/05 Advanced Lighting/09 SSAO.md similarity index 100% rename from docs/05 Advanced Lighting/09 SSAO.md rename to 05 Advanced Lighting/09 SSAO.md diff --git a/docs/06 In Practice/02 Text Rendering.md b/06 In Practice/02 Text Rendering.md similarity index 100% rename from docs/06 In Practice/02 Text Rendering.md rename to 06 In Practice/02 Text Rendering.md diff --git a/docs/06 In Practice/03 2D Game.md b/06 In Practice/03 2D Game.md similarity index 100% rename from docs/06 In Practice/03 2D Game.md rename to 06 In Practice/03 2D Game.md diff --git a/docs/06 In Practice/2D-Game/01 Breakout.md b/06 In Practice/2D-Game/01 Breakout.md similarity index 100% rename from docs/06 In Practice/2D-Game/01 Breakout.md rename to 06 In Practice/2D-Game/01 Breakout.md diff --git a/css/code_fixer.css b/css/code_fixer.css new file mode 100644 index 0000000..e3985c4 --- /dev/null +++ b/css/code_fixer.css @@ -0,0 +1,70 @@ +.wy-nav-content { + max-width: 1300px; +} + +body { + font-family: "微软雅黑", "宋体", "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + margin-bottom: 10px; + margin-top: 20px; +} + +h1, h2 { + margin-top: 25px; + border-bottom: 1px solid #e1e4e5; + padding-bottom: 10px; +} + +.wy-nav-content p, .wy-nav-content ol, .wy-nav-content ul, .wy-nav-content dl { + margin-bottom: 10px !important; +} + +table td, table th { + font-size: 100% !important; +} + +code,.rst-content tt { + font-size: 100%; + background: #F8F8F8; +} + +p code { + font-size: 80%; + word-wrap: normal; + font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; +} + +div.admonition code { + display: inline-block; + overflow-x: visible; + line-height: 18px; + color: #404040; + border: 1px solid rgba(0, 0, 0, 0.2); + background: rgba(255, 255, 255, 0.7); + font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; +} + +.rst-content img { + display: block; + margin-left: auto; + margin-right: auto; +} + +video { + display: block; + margin-left: auto; + margin-right: auto; +} + +@media screen and (max-width: 800px) { + p, ol, ul { + text-align: left; + } +} + +.hljs-comment { + font-style: normal; + font-size: 85%; +} diff --git a/docs/css/admonition_fix.css b/docs/css/admonition_fix.css deleted file mode 100644 index 9398067..0000000 --- a/docs/css/admonition_fix.css +++ /dev/null @@ -1,29 +0,0 @@ -.admonition-title { - display: none; -} - -.admonition p{ - margin: auto; -} - -.important, .note, .attention { - display: block; - margin: 20px; - padding: 15px; - color: #444; - border-radius: 5px; -} - -.important { - background-color: #D8F5D8; - border: 2px solid #AFDFAF; -} - -.attention { - background-color: #FFD2D2; - border: 2px solid #E0B3B3; -} - -.important { - background: #dbfaf4; -} diff --git a/docs/css/style.css b/docs/css/style.css deleted file mode 100644 index 0d9d1c3..0000000 --- a/docs/css/style.css +++ /dev/null @@ -1,66 +0,0 @@ -body { - font-family: "微软雅黑", "宋体", "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; -} - -h1, h2, h3, h4, h5, h6 { - margin-bottom: 15px; - margin-top: 20px; -} - -h1, h2 { - margin-top: 25px; - border-bottom: 1px solid #e1e4e5; - padding-bottom: 15px; -} - -.col-md-9 p { - line-height: 180%; -} - -table td, table th { - font-size: 100% !important; -} - -code { - font-size: 100%; - background: #F8F8F8; -} - -p code { - font-size: 80%; - word-wrap: normal; - font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; -} - -div.admonition code { - display: inline-block; - overflow-x: visible; - line-height: 18px; - color: #404040; - border: 1px solid rgba(0, 0, 0, 0.2); - background: rgba(255, 255, 255, 0.7); - font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; -} - -img { - display: block; - margin-left: auto; - margin-right: auto; -} - -video { - display: block; - margin-left: auto; - margin-right: auto; -} - -@media screen and (max-width: 800px) { - p, ol, ul { - text-align: left; - } -} - -.hljs-comment { - font-style: normal; - font-size: 90%; -} diff --git a/docs/img/01-08-01.png b/img/01-08-01.png similarity index 100% rename from docs/img/01-08-01.png rename to img/01-08-01.png diff --git a/docs/img/05_01_01.png b/img/05_01_01.png similarity index 100% rename from docs/img/05_01_01.png rename to img/05_01_01.png diff --git a/docs/img/05_01_F_depth.png b/img/05_01_F_depth.png similarity index 100% rename from docs/img/05_01_F_depth.png rename to img/05_01_F_depth.png diff --git a/docs/img/05_01_F_depth_nonliner.png b/img/05_01_F_depth_nonliner.png similarity index 100% rename from docs/img/05_01_F_depth_nonliner.png rename to img/05_01_F_depth_nonliner.png diff --git a/docs/img/05_05_Edge_detection.png b/img/05_05_Edge_detection.png similarity index 100% rename from docs/img/05_05_Edge_detection.png rename to img/05_05_Edge_detection.png diff --git a/docs/img/05_05_blur_sample.png b/img/05_05_blur_sample.png similarity index 100% rename from docs/img/05_05_blur_sample.png rename to img/05_05_blur_sample.png diff --git a/docs/img/05_05framebuffers_ kernel_sample.png b/img/05_05framebuffers_ kernel_sample.png similarity index 100% rename from docs/img/05_05framebuffers_ kernel_sample.png rename to img/05_05framebuffers_ kernel_sample.png diff --git a/docs/img/5256.png b/img/5256.png similarity index 100% rename from docs/img/5256.png rename to img/5256.png diff --git a/docs/img/F_light.png b/img/F_light.png similarity index 100% rename from docs/img/F_light.png rename to img/F_light.png diff --git a/docs/img/I.png b/img/I.png similarity index 100% rename from docs/img/I.png rename to img/I.png diff --git a/docs/img/I_max.png b/img/I_max.png similarity index 100% rename from docs/img/I_max.png rename to img/I_max.png diff --git a/docs/img/Kc.png b/img/Kc.png similarity index 100% rename from docs/img/Kc.png rename to img/Kc.png diff --git a/docs/img/Kl.png b/img/Kl.png similarity index 100% rename from docs/img/Kl.png rename to img/Kl.png diff --git a/docs/img/Kq.png b/img/Kq.png similarity index 100% rename from docs/img/Kq.png rename to img/Kq.png diff --git a/docs/img/Light_casters1.png b/img/Light_casters1.png similarity index 100% rename from docs/img/Light_casters1.png rename to img/Light_casters1.png diff --git a/docs/img/Light_casters2.png b/img/Light_casters2.png similarity index 100% rename from docs/img/Light_casters2.png rename to img/Light_casters2.png diff --git a/docs/img/Light_casters3.png b/img/Light_casters3.png similarity index 100% rename from docs/img/Light_casters3.png rename to img/Light_casters3.png diff --git a/docs/img/OpenGL_pipline_cn.png b/img/OpenGL_pipline_cn.png similarity index 100% rename from docs/img/OpenGL_pipline_cn.png rename to img/OpenGL_pipline_cn.png diff --git a/docs/img/blending_C_result.png b/img/blending_C_result.png similarity index 100% rename from docs/img/blending_C_result.png rename to img/blending_C_result.png diff --git a/docs/img/camera3.png b/img/camera3.png similarity index 100% rename from docs/img/camera3.png rename to img/camera3.png diff --git a/docs/img/camera4.png b/img/camera4.png similarity index 100% rename from docs/img/camera4.png rename to img/camera4.png diff --git a/docs/img/coordinate_system_1.png b/img/coordinate_system_1.png similarity index 100% rename from docs/img/coordinate_system_1.png rename to img/coordinate_system_1.png diff --git a/docs/img/coordinate_system_2.png b/img/coordinate_system_2.png similarity index 100% rename from docs/img/coordinate_system_2.png rename to img/coordinate_system_2.png diff --git a/docs/img/d.png b/img/d.png similarity index 100% rename from docs/img/d.png rename to img/d.png diff --git a/docs/img/deferred_shading_1.png b/img/deferred_shading_1.png similarity index 100% rename from docs/img/deferred_shading_1.png rename to img/deferred_shading_1.png diff --git a/docs/img/deferred_shading_2.png b/img/deferred_shading_2.png similarity index 100% rename from docs/img/deferred_shading_2.png rename to img/deferred_shading_2.png diff --git a/docs/img/deferred_shading_3.png b/img/deferred_shading_3.png similarity index 100% rename from docs/img/deferred_shading_3.png rename to img/deferred_shading_3.png diff --git a/docs/img/deferred_shading_4.png b/img/deferred_shading_4.png similarity index 100% rename from docs/img/deferred_shading_4.png rename to img/deferred_shading_4.png diff --git a/docs/img/deferred_shading_5.png b/img/deferred_shading_5.png similarity index 100% rename from docs/img/deferred_shading_5.png rename to img/deferred_shading_5.png diff --git a/docs/img/deferred_shading_6.png b/img/deferred_shading_6.png similarity index 100% rename from docs/img/deferred_shading_6.png rename to img/deferred_shading_6.png diff --git a/docs/img/deferred_shading_7.png b/img/deferred_shading_7.png similarity index 100% rename from docs/img/deferred_shading_7.png rename to img/deferred_shading_7.png diff --git a/docs/img/deferred_shading_8.png b/img/deferred_shading_8.png similarity index 100% rename from docs/img/deferred_shading_8.png rename to img/deferred_shading_8.png diff --git a/docs/img/epsilon.png b/img/epsilon.png similarity index 100% rename from docs/img/epsilon.png rename to img/epsilon.png diff --git a/docs/img/gamma.png b/img/gamma.png similarity index 100% rename from docs/img/gamma.png rename to img/gamma.png diff --git a/docs/img/look_at.png b/img/look_at.png similarity index 100% rename from docs/img/look_at.png rename to img/look_at.png diff --git a/docs/img/look_at_D.png b/img/look_at_D.png similarity index 100% rename from docs/img/look_at_D.png rename to img/look_at_D.png diff --git a/docs/img/look_at_P.png b/img/look_at_P.png similarity index 100% rename from docs/img/look_at_P.png rename to img/look_at_P.png diff --git a/docs/img/look_at_R.png b/img/look_at_R.png similarity index 100% rename from docs/img/look_at_R.png rename to img/look_at_R.png diff --git a/docs/img/look_at_U.png b/img/look_at_U.png similarity index 100% rename from docs/img/look_at_U.png rename to img/look_at_U.png diff --git a/docs/img/phi.png b/img/phi.png similarity index 100% rename from docs/img/phi.png rename to img/phi.png diff --git a/docs/img/quad_formula.png b/img/quad_formula.png similarity index 100% rename from docs/img/quad_formula.png rename to img/quad_formula.png diff --git a/docs/img/shaders1.jpg b/img/shaders1.jpg similarity index 100% rename from docs/img/shaders1.jpg rename to img/shaders1.jpg diff --git a/docs/img/shaders2.jpg b/img/shaders2.jpg similarity index 100% rename from docs/img/shaders2.jpg rename to img/shaders2.jpg diff --git a/docs/img/theta.png b/img/theta.png similarity index 100% rename from docs/img/theta.png rename to img/theta.png diff --git a/docs/img/trans/arccos.png b/img/trans/arccos.png similarity index 100% rename from docs/img/trans/arccos.png rename to img/trans/arccos.png diff --git a/docs/img/trans/commutative.png b/img/trans/commutative.png similarity index 100% rename from docs/img/trans/commutative.png rename to img/trans/commutative.png diff --git a/docs/img/trans/costheta.png b/img/trans/costheta.png similarity index 100% rename from docs/img/trans/costheta.png rename to img/trans/costheta.png diff --git a/docs/img/trans/costheta2.png b/img/trans/costheta2.png similarity index 100% rename from docs/img/trans/costheta2.png rename to img/trans/costheta2.png diff --git a/docs/img/trans/k_black.png b/img/trans/k_black.png similarity index 100% rename from docs/img/trans/k_black.png rename to img/trans/k_black.png diff --git a/docs/img/trans/k_green.png b/img/trans/k_green.png similarity index 100% rename from docs/img/trans/k_green.png rename to img/trans/k_green.png diff --git a/docs/img/trans/n_unit.png b/img/trans/n_unit.png similarity index 100% rename from docs/img/trans/n_unit.png rename to img/trans/n_unit.png diff --git a/docs/img/trans/rxryrz.png b/img/trans/rxryrz.png similarity index 100% rename from docs/img/trans/rxryrz.png rename to img/trans/rxryrz.png diff --git a/docs/img/trans/s1s2s3.png b/img/trans/s1s2s3.png similarity index 100% rename from docs/img/trans/s1s2s3.png rename to img/trans/s1s2s3.png diff --git a/docs/img/trans/s_blue.png b/img/trans/s_blue.png similarity index 100% rename from docs/img/trans/s_blue.png rename to img/trans/s_blue.png diff --git a/docs/img/trans/t1t2t3.png b/img/trans/t1t2t3.png similarity index 100% rename from docs/img/trans/t1t2t3.png rename to img/trans/t1t2t3.png diff --git a/docs/img/trans/transformations1.png b/img/trans/transformations1.png similarity index 100% rename from docs/img/trans/transformations1.png rename to img/trans/transformations1.png diff --git a/docs/img/trans/transformations10.png b/img/trans/transformations10.png similarity index 100% rename from docs/img/trans/transformations10.png rename to img/trans/transformations10.png diff --git a/docs/img/trans/transformations11.png b/img/trans/transformations11.png similarity index 100% rename from docs/img/trans/transformations11.png rename to img/trans/transformations11.png diff --git a/docs/img/trans/transformations12.png b/img/trans/transformations12.png similarity index 100% rename from docs/img/trans/transformations12.png rename to img/trans/transformations12.png diff --git a/docs/img/trans/transformations13.png b/img/trans/transformations13.png similarity index 100% rename from docs/img/trans/transformations13.png rename to img/trans/transformations13.png diff --git a/docs/img/trans/transformations14.png b/img/trans/transformations14.png similarity index 100% rename from docs/img/trans/transformations14.png rename to img/trans/transformations14.png diff --git a/docs/img/trans/transformations15.png b/img/trans/transformations15.png similarity index 100% rename from docs/img/trans/transformations15.png rename to img/trans/transformations15.png diff --git a/docs/img/trans/transformations16.png b/img/trans/transformations16.png similarity index 100% rename from docs/img/trans/transformations16.png rename to img/trans/transformations16.png diff --git a/docs/img/trans/transformations17.png b/img/trans/transformations17.png similarity index 100% rename from docs/img/trans/transformations17.png rename to img/trans/transformations17.png diff --git a/docs/img/trans/transformations18.png b/img/trans/transformations18.png similarity index 100% rename from docs/img/trans/transformations18.png rename to img/trans/transformations18.png diff --git a/docs/img/trans/transformations19.png b/img/trans/transformations19.png similarity index 100% rename from docs/img/trans/transformations19.png rename to img/trans/transformations19.png diff --git a/docs/img/trans/transformations2.png b/img/trans/transformations2.png similarity index 100% rename from docs/img/trans/transformations2.png rename to img/trans/transformations2.png diff --git a/docs/img/trans/transformations20.png b/img/trans/transformations20.png similarity index 100% rename from docs/img/trans/transformations20.png rename to img/trans/transformations20.png diff --git a/docs/img/trans/transformations21.png b/img/trans/transformations21.png similarity index 100% rename from docs/img/trans/transformations21.png rename to img/trans/transformations21.png diff --git a/docs/img/trans/transformations22.png b/img/trans/transformations22.png similarity index 100% rename from docs/img/trans/transformations22.png rename to img/trans/transformations22.png diff --git a/docs/img/trans/transformations23.png b/img/trans/transformations23.png similarity index 100% rename from docs/img/trans/transformations23.png rename to img/trans/transformations23.png diff --git a/docs/img/trans/transformations24.png b/img/trans/transformations24.png similarity index 100% rename from docs/img/trans/transformations24.png rename to img/trans/transformations24.png diff --git a/docs/img/trans/transformations25.png b/img/trans/transformations25.png similarity index 100% rename from docs/img/trans/transformations25.png rename to img/trans/transformations25.png diff --git a/docs/img/trans/transformations26.png b/img/trans/transformations26.png similarity index 100% rename from docs/img/trans/transformations26.png rename to img/trans/transformations26.png diff --git a/docs/img/trans/transformations27.png b/img/trans/transformations27.png similarity index 100% rename from docs/img/trans/transformations27.png rename to img/trans/transformations27.png diff --git a/docs/img/trans/transformations28.png b/img/trans/transformations28.png similarity index 100% rename from docs/img/trans/transformations28.png rename to img/trans/transformations28.png diff --git a/docs/img/trans/transformations29.png b/img/trans/transformations29.png similarity index 100% rename from docs/img/trans/transformations29.png rename to img/trans/transformations29.png diff --git a/docs/img/trans/transformations3.png b/img/trans/transformations3.png similarity index 100% rename from docs/img/trans/transformations3.png rename to img/trans/transformations3.png diff --git a/docs/img/trans/transformations30.png b/img/trans/transformations30.png similarity index 100% rename from docs/img/trans/transformations30.png rename to img/trans/transformations30.png diff --git a/docs/img/trans/transformations31.png b/img/trans/transformations31.png similarity index 100% rename from docs/img/trans/transformations31.png rename to img/trans/transformations31.png diff --git a/docs/img/trans/transformations32.png b/img/trans/transformations32.png similarity index 100% rename from docs/img/trans/transformations32.png rename to img/trans/transformations32.png diff --git a/docs/img/trans/transformations4.png b/img/trans/transformations4.png similarity index 100% rename from docs/img/trans/transformations4.png rename to img/trans/transformations4.png diff --git a/docs/img/trans/transformations5.png b/img/trans/transformations5.png similarity index 100% rename from docs/img/trans/transformations5.png rename to img/trans/transformations5.png diff --git a/docs/img/trans/transformations6.png b/img/trans/transformations6.png similarity index 100% rename from docs/img/trans/transformations6.png rename to img/trans/transformations6.png diff --git a/docs/img/trans/transformations7.png b/img/trans/transformations7.png similarity index 100% rename from docs/img/trans/transformations7.png rename to img/trans/transformations7.png diff --git a/docs/img/trans/transformations8.png b/img/trans/transformations8.png similarity index 100% rename from docs/img/trans/transformations8.png rename to img/trans/transformations8.png diff --git a/docs/img/trans/transformations9.png b/img/trans/transformations9.png similarity index 100% rename from docs/img/trans/transformations9.png rename to img/trans/transformations9.png diff --git a/docs/img/trans/v.k.png b/img/trans/v.k.png similarity index 100% rename from docs/img/trans/v.k.png rename to img/trans/v.k.png diff --git a/docs/img/trans/v_black.png b/img/trans/v_black.png similarity index 100% rename from docs/img/trans/v_black.png rename to img/trans/v_black.png diff --git a/docs/img/trans/v_mag.png b/img/trans/v_mag.png similarity index 100% rename from docs/img/trans/v_mag.png rename to img/trans/v_mag.png diff --git a/docs/img/trans/v_red.png b/img/trans/v_red.png similarity index 100% rename from docs/img/trans/v_red.png rename to img/trans/v_red.png diff --git a/docs/img/trans/vxk.png b/img/trans/vxk.png similarity index 100% rename from docs/img/trans/vxk.png rename to img/trans/vxk.png diff --git a/docs/img/trans/w_blue.png b/img/trans/w_blue.png similarity index 100% rename from docs/img/trans/w_blue.png rename to img/trans/w_blue.png diff --git a/docs/img/trans/z_sq.png b/img/trans/z_sq.png similarity index 100% rename from docs/img/trans/z_sq.png rename to img/trans/z_sq.png diff --git a/docs/index.md b/index.md similarity index 100% rename from docs/index.md rename to index.md diff --git a/mkdocs.yml b/mkdocs.yml index e0bee3b..cfc2334 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,58 +1,57 @@ pages: - 主页: 'index.md' - - 目录: - - 入门(Getting started): - - OpenGL: '01 Getting started/01 OpenGL.md' - - 创建窗口: '01 Getting started/02 Creating a window.md' - - 你好,窗口: '01 Getting started/03 Hello Window.md' - - 你好,三角形: '01 Getting started/04 Hello Triangle.md' - - 着色器: '01 Getting started/05 Shaders.md' - - 纹理: '01 Getting started/06 Textures.md' - - 变换: '01 Getting started/07 Transformations.md' - - 坐标系统: '01 Getting started/08 Coordinate Systems.md' - - 摄像机: '01 Getting started/09 Camera.md' - - 复习: '01 Getting started/10 Review.md' - - 光照(Lighting): - - 颜色: '02 Lighting/01 Colors.md' - - 光照基础: '02 Lighting/02 Basic Lighting.md' - - 材质: '02 Lighting/03 Materials.md' - - 光照贴图: '02 Lighting/04 Lighting maps.md' - - 投光物: '02 Lighting/05 Light casters.md' - - 多光源: '02 Lighting/06 Multiple lights.md' - - 复习: '02 Lighting/07 Review.md' - - 加载模型(Model Loading): - - Assimp开源模型导入库: '03 Model Loading/01 Assimp.md' - - 网格: '03 Model Loading/02 Mesh.md' - - 模型: '03 Model Loading/03 Model.md' - - 高级OpenGL(Advanced OpenGL): - - 深度测试: '04 Advanced OpenGL/01 Depth testing.md' - - 模板测试: '04 Advanced OpenGL/02 Stencil testing.md' - - 混合: '04 Advanced OpenGL/03 Blending.md' - - 面剔除: '04 Advanced OpenGL/04 Face culling.md' - - 帧缓冲: '04 Advanced OpenGL/05 Framebuffers.md' - - 立方体贴图: '04 Advanced OpenGL/06 Cubemaps.md' - - 高级数据: '04 Advanced OpenGL/07 Advanced Data.md' - - 高级GLSL: '04 Advanced OpenGL/08 Advanced GLSL.md' - - 几何着色器: '04 Advanced OpenGL/09 Geometry Shader.md' - - 实例化: '04 Advanced OpenGL/10 Instancing.md' - - 抗锯齿: '04 Advanced OpenGL/11 Anti Aliasing.md' - - 高级光照(Advanced Lighting): - - 高级光照: '05 Advanced Lighting/01 Advanced Lighting.md' - - Gamma校正: '05 Advanced Lighting/02 Gamma Correction.md' - - 阴影: - - 阴影映射: '05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md' - - 点阴影: '05 Advanced Lighting/03 Shadows/02 Point Shadows.md' - - CSM: '05 Advanced Lighting/03 Shadows/03 CSM.md' - - 法线贴图: '05 Advanced Lighting/04 Normal Mapping.md' - - 视差贴图: '05 Advanced Lighting/05 Parallax Mapping.md' - - HDR: '05 Advanced Lighting/06 HDR.md' - - 泛光: '05 Advanced Lighting/07 Bloom.md' - - 延迟着色法: '05 Advanced Lighting/08 Deferred Shading.md' - - SSAO: '05 Advanced Lighting/09 SSAO.md' - - 实战(In Practice): - - 文字渲染: '06 In Practice/02 Text Rendering.md' - - 2D游戏: - - Breakout: '06 In Practice/2D-Game/01 Breakout.md' + - 入门(Getting started): + - OpenGL: '01 Getting started/01 OpenGL.md' + - 创建窗口: '01 Getting started/02 Creating a window.md' + - 你好,窗口: '01 Getting started/03 Hello Window.md' + - 你好,三角形: '01 Getting started/04 Hello Triangle.md' + - 着色器: '01 Getting started/05 Shaders.md' + - 纹理: '01 Getting started/06 Textures.md' + - 变换: '01 Getting started/07 Transformations.md' + - 坐标系统: '01 Getting started/08 Coordinate Systems.md' + - 摄像机: '01 Getting started/09 Camera.md' + - 复习: '01 Getting started/10 Review.md' + - 光照(Lighting): + - 颜色: '02 Lighting/01 Colors.md' + - 光照基础: '02 Lighting/02 Basic Lighting.md' + - 材质: '02 Lighting/03 Materials.md' + - 光照贴图: '02 Lighting/04 Lighting maps.md' + - 投光物: '02 Lighting/05 Light casters.md' + - 多光源: '02 Lighting/06 Multiple lights.md' + - 复习: '02 Lighting/07 Review.md' + - 加载模型(Model Loading): + - Assimp开源模型导入库: '03 Model Loading/01 Assimp.md' + - 网格: '03 Model Loading/02 Mesh.md' + - 模型: '03 Model Loading/03 Model.md' + - 高级OpenGL(Advanced OpenGL): + - 深度测试: '04 Advanced OpenGL/01 Depth testing.md' + - 模板测试: '04 Advanced OpenGL/02 Stencil testing.md' + - 混合: '04 Advanced OpenGL/03 Blending.md' + - 面剔除: '04 Advanced OpenGL/04 Face culling.md' + - 帧缓冲: '04 Advanced OpenGL/05 Framebuffers.md' + - 立方体贴图: '04 Advanced OpenGL/06 Cubemaps.md' + - 高级数据: '04 Advanced OpenGL/07 Advanced Data.md' + - 高级GLSL: '04 Advanced OpenGL/08 Advanced GLSL.md' + - 几何着色器: '04 Advanced OpenGL/09 Geometry Shader.md' + - 实例化: '04 Advanced OpenGL/10 Instancing.md' + - 抗锯齿: '04 Advanced OpenGL/11 Anti Aliasing.md' + - 高级光照(Advanced Lighting): + - 高级光照: '05 Advanced Lighting/01 Advanced Lighting.md' + - Gamma校正: '05 Advanced Lighting/02 Gamma Correction.md' + - 阴影: + - 阴影映射: '05 Advanced Lighting/03 Shadows/01 Shadow Mapping.md' + - 点阴影: '05 Advanced Lighting/03 Shadows/02 Point Shadows.md' + - CSM: '05 Advanced Lighting/03 Shadows/03 CSM.md' + - 法线贴图: '05 Advanced Lighting/04 Normal Mapping.md' + - 视差贴图: '05 Advanced Lighting/05 Parallax Mapping.md' + - HDR: '05 Advanced Lighting/06 HDR.md' + - 泛光: '05 Advanced Lighting/07 Bloom.md' + - 延迟着色法: '05 Advanced Lighting/08 Deferred Shading.md' + - SSAO: '05 Advanced Lighting/09 SSAO.md' + - 实战(In Practice): + - 文字渲染: '06 In Practice/02 Text Rendering.md' + - 2D游戏: + - Breakout: '06 In Practice/2D-Game/01 Breakout.md' site_name: LearnOpenGL-CN @@ -63,12 +62,7 @@ markdown_extensions: - mdx_math extra_javascript: - - 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML' +- 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML' extra_css: - - css/style.css - - css/admonition_fix.css - -docs_dir: 'docs' - -theme: yeti \ No newline at end of file + - css/code_fixer.css