Browse Source

Updated manual

Christophe Riccio 9 years ago
parent
commit
3ca24a12a1
1 changed files with 48 additions and 89 deletions
  1. 48 89
      manual.md

+ 48 - 89
manual.md

@@ -104,108 +104,68 @@ reports](https://github.com/g-truc/glm/issues) for bugs and feature
 requests. Any feedback is welcome at
 [*[email protected]*](mailto:[email protected]).
 
-1. Getting started {#getting-started .HeadingA}
-==================
-
-1.1. Setup {#setup .HeadingB}
-----------
+---
+## 1. Getting started
+### 1.1. Setup
 
-GLM is a header only library. Hence, there is nothing to build to use
-it. To use GLM, a programmer only has to include <glm/glm.hpp> in
-his program. This include provides all the GLSL features implemented by
+GLM is a header only library. Hence, there is nothing to build to use it. To use GLM, a programmer only has to include <glm/glm.hpp> in his program. This include provides all the GLSL features implemented by
 GLM.
 
-Core GLM features can be included using individual headers to allow
-faster user program compilations.
-
-<glm/vec2.hpp>: vec2, bvec2, dvec2, ivec2 and uvec2
-
-<glm/vec3.hpp>: vec3, bvec3, dvec3, ivec3 and uvec3
-
-<glm/vec4.hpp>: vec4, bvec4, dvec4, ivec4 and uvec4
-
-<glm/mat2x2.hpp>: mat2, dmat2
-
-<glm/mat2x3.hpp>: mat2x3, dmat2x3
-
-<glm/mat2x4.hpp>: mat2x4, dmat2x4
-
-<glm/mat3x2.hpp>: mat3x2, dmat3x2
-
-<glm/mat3x3.hpp>: mat3, dmat3
-
-<glm/mat3x4.hpp>: mat3x4, dmat2
-
-<glm/mat4x2.hpp>: mat4x2, dmat4x2
-
-<glm/mat4x3.hpp>: mat4x3, dmat4x3
-
-<glm/mat4x4.hpp>: mat4, dmat4
-
-<glm/common.hpp>: all the GLSL common functions
-
-<glm/exponential.hpp>: all the GLSL exponential functions
-
-<glm/geometry.hpp>: all the GLSL geometry functions
-
-<glm/integer.hpp>: all the GLSL integer functions
-
-<glm/matrix.hpp>: all the GLSL matrix functions
-
-<glm/packing.hpp>: all the GLSL packing functions
-
-<glm/trigonometric.hpp>: all the GLSL trigonometric functions
-
-<glm/vector\_relational.hpp>: all the GLSL vector relational
-functions
-
-1.2. Faster program compilation {#faster-program-compilation .HeadingB}
--------------------------------
+Core GLM features can be included using individual headers to allow faster user program compilations.
+
+* <glm/vec2.hpp>: vec2, bvec2, dvec2, ivec2 and uvec2
+* <glm/vec3.hpp>: vec3, bvec3, dvec3, ivec3 and uvec3
+* <glm/vec4.hpp>: vec4, bvec4, dvec4, ivec4 and uvec4
+* <glm/mat2x2.hpp>: mat2, dmat2
+* <glm/mat2x3.hpp>: mat2x3, dmat2x3
+* <glm/mat2x4.hpp>: mat2x4, dmat2x4
+* <glm/mat3x2.hpp>: mat3x2, dmat3x2
+* <glm/mat3x3.hpp>: mat3, dmat3
+* <glm/mat3x4.hpp>: mat3x4, dmat2
+* <glm/mat4x2.hpp>: mat4x2, dmat4x2
+* <glm/mat4x3.hpp>: mat4x3, dmat4x3
+* <glm/mat4x4.hpp>: mat4, dmat4
+* <glm/common.hpp>: all the GLSL common functions
+* <glm/exponential.hpp>: all the GLSL exponential functions
+* <glm/geometry.hpp>: all the GLSL geometry functions
+* <glm/integer.hpp>: all the GLSL integer functions
+* <glm/matrix.hpp>: all the GLSL matrix functions
+* <glm/packing.hpp>: all the GLSL packing functions
+* <glm/trigonometric.hpp>: all the GLSL trigonometric functions
+* <glm/vector\_relational.hpp>: all the GLSL vector relational functions
+
+### 1.2. Faster program compilation
 
 GLM is a header only library that makes a heavy usage of C++ templates.
-This design may significantly increase the compile time for files that
-use GLM. Hence, it is important to limit GLM inclusion to header and
-source files that actually use it. Likewise, GLM extensions should be
-included only in program sources using them.
+This design may significantly increase the compile time for files that use GLM. Hence, it is important to limit GLM inclusion to header and source files that actually use it. Likewise, GLM extensions should be
+included only in program sources using them. 
 
 To further help compilation time, GLM 0.9.5 introduced
 <glm/fwd.hpp> that provides forward declarations of GLM types.
 
-  -------------------------------
-  // Header file
-
-  \#include <glm/fwd.hpp>
+```cpp
+// Header file
+#include <glm/fwd.hpp>
 
-  // Source file
+// Source file
+#include <glm/glm.hpp>;
+```
 
-  \#include &lt;glm/glm.hpp&gt;
-  -------------------------------
-  -------------------------------
-
-1.3. Use sample of GLM core {#use-sample-of-glm-core .HeadingB}
----------------------------
-
-  ---------------------------------------------------------------------------
-  // Include GLM core features
+### 1.3. Use sample of GLM core
 
-  \#include &lt;glm/vec3.hpp&gt;
+```cpp
+// Include GLM core features
+\#include &lt;glm/vec3.hpp&gt;
+\#include &lt;glm/vec4.hpp&gt;
+\#include &lt;glm/mat4x4.hpp&gt;
+\#include &lt;glm/trigonometric.hpp&gt;
 
-  \#include &lt;glm/vec4.hpp&gt;
-
-  \#include &lt;glm/mat4x4.hpp&gt;
-
-  \#include &lt;glm/trigonometric.hpp&gt;
-
-  // Include GLM extensions
-
-  \#include &lt;glm/gtc/matrix\_transform.hpp&gt;
-
-  glm::mat4 transform(
+// Include GLM extensions
+\#include &lt;glm/gtc/matrix\_transform.hpp&gt;
 
+glm::mat4 transform(
   glm::vec2 const& Orientation,
-
   glm::vec3 const& Translate,
-
   glm::vec3 const& Up)
 
   {
@@ -223,10 +183,9 @@ To further help compilation time, GLM 0.9.5 introduced
   return Proj \* View \* Model;
 
   }
-  ---------------------------------------------------------------------------
-  ---------------------------------------------------------------------------
+```
 
-1.4. Dependencies {#dependencies .HeadingB}
+### 1.4. Dependencies {#dependencies .HeadingB}
 -----------------
 
 When &lt;glm/glm.hpp&gt; is included, GLM provides all the GLSL features