From 26d2eb5b22753d426ca0de2a26630cdbb4120377 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Tue, 8 Nov 2016 15:50:21 -0500 Subject: [PATCH] Add my old proofread text to Section 1 --- manual.md | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/manual.md b/manual.md index d4f6d22d..a5ef9035 100644 --- a/manual.md +++ b/manual.md @@ -7,10 +7,10 @@ --- ## Table of Contents + [0. Licenses](#section0) -+ [1. Getting started](#section1) ++ [1. Getting Started](#section1) + [1.1. Setup](#section1_1) -+ [1.2. Faster program compilation](#section1_2) -+ [1.3. Use sample of GLM core](#section1_3) ++ [1.2. Faster Compilation](#section1_2) ++ [1.3. Example Usage](#section1_3) + [1.4. Dependencies](#section1_4) + [2. Swizzle operators](#section2) + [2.1. Standard C++98 implementation](#section2_1) @@ -137,10 +137,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ![](https://github.com/g-truc/glm/blob/manual/doc/manual/frontpage2.png) --- -## 1. Getting started +## 1. Getting Started ### 1.1. Setup -GLM is a header only library. Hence, there is nothing to build to use it. To use GLM, merely include <glm/glm.hpp> header. This include provides all the GLSL features implemented by GLM. +GLM is a header-only library, and thus does not need to be compiled. To use GLM, merely include the `` header, which provides GLSL's mathematics functionality. + Core GLM features can be included using individual headers to allow faster user program compilations. @@ -167,23 +168,21 @@ Core GLM features can be included using individual headers to allow faster user #include // all the GLSL vector relational functions ``` -### 1.2. Faster program compilation +### 1.2. Faster 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. +GLM makes heavy use of C++ templates, which may significantly increase the compile time for projects that use GLM. Hence, source files should only include the GLM headers they actually use. -To further help compilation time, GLM 0.9.5 introduced <glm/fwd.hpp> that provides forward declarations of GLM types. +To further reduce compilation time, include ``, which provides forward declarations of all types should their full definitions not be needed. ```cpp // Header file (forward declarations only) #include // Source file (actual implementation) -#include ; +#include ``` -### 1.3. Use sample of GLM core +### 1.3. Example Usage ```cpp // Include GLM core features @@ -208,12 +207,9 @@ glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, gl ### 1.4. Dependencies -When <glm/glm.hpp> is included, GLM provides all the GLSL features it implements in C++. +The `` header provides all standard GLSL features. -There is no dependence with external libraries or external headers such as gl.h, [*glcorearb.h*](http://www.opengl.org/registry/api/GL/glcorearb.h), gl3.h, glu.h or windows.h. However, if <boost/static\_assert.hpp> -is included, [*Boost static assert*](http://www.boost.org/doc/libs/1_52_0/doc/html/boost_staticassert.html) will be used all over GLM code to provide compiled time errors unless -GLM is built with a C++ 11 compiler in which case [static\_assert](http://en.cppreference.com/w/cpp/language/static_assert). -If neither are detected, GLM will rely on its own implementation of static assert. +GLM does not depend on external libraries or external headers such as ``, [``](http://www.opengl.org/registry/api/GL/glcorearb.h), ``, ``, or ``. However, if `` is included, then [`Boost.StaticAssert`](http://www.boost.org/doc/libs/release/libs/static_assert) will be used to provide compile-time errors. Otherwise, if using a C++11 compiler, the standard `static_assert` will be used instead. If neither is available, GLM will use its own implementation of `static_assert`. --- ## 2. Swizzle operators