{"action":"opened","issue":{"url":"https://api.github.com/repos/g-truc/glm/issues/454","labels_url":"https://api.github.com/repos/g-truc/glm/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/g-truc/glm/issues/454/comments","events_url":"https://api.github.com/repos/g-truc/glm/issues/454/events","html_url":"https://github.com/g-truc/glm/issues/454","id":118297889,"number":454,"title":"Early feedback on revised GLM manual","user":{"login":"JesseTG","id":1175189,"avatar_url":"https://avatars.githubusercontent.com/u/1175189?v=3","gravatar_id":"","url":"https://api.github.com/users/JesseTG","html_url":"https://github.com/JesseTG","followers_url":"https://api.github.com/users/JesseTG/followers","following_url":"https://api.github.com/users/JesseTG/following{/other_user}","gists_url":"https://api.github.com/users/JesseTG/gists{/gist_id}","starred_url":"https://api.github.com/users/JesseTG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JesseTG/subscriptions","organizations_url":"https://api.github.com/users/JesseTG/orgs","repos_url":"https://api.github.com/users/JesseTG/repos","events_url":"https://api.github.com/users/JesseTG/events{/privacy}","received_events_url":"https://api.github.com/users/JesseTG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-22T23:25:39Z","updated_at":"2015-11-22T23:25:39Z","closed_at":null,"body":"I'm in the process of converting the documentation to LaTeX, instead of the DOCX file that exists now.  I proposed this in the [`gli` repo](https://github.com/g-truc/gli/issues/74), but I'm doing the GLM manual first, so let's bring the discussion here.\r\n\r\nI've attached the LaTeX for the first section and its PDF output, for your perusal.\r\n\r\n[Overleaf Link](https://www.overleaf.com/read/hpghvksqfqft)\r\n\r\n[glm-manual.pdf](https://github.com/g-truc/glm/files/41202/glm-manual.pdf)\r\n```latex\r\n\r\n\\documentclass{scrartcl}\r\n\r\n% Packages\r\n% ---\r\n\\usepackage[utf8]{inputenc} % Unicode support (Umlauts etc.)\r\n\\usepackage{hyperref} % Add a link to your document\r\n\\usepackage{graphicx} % Add pictures to your document\r\n\\usepackage{xcolor} % Allow verbatim text in macro arguments\r\n\\usepackage{cprotect}\r\n\\usepackage{minted} % Source code formatting and highlighting\r\n\r\n\\setlength{\\parindent}{0em}\r\n\\setlength{\\parskip}{1em}\r\n\r\n\r\n\\definecolor{beige}{rgb}{0.95,0.95,0.92}\r\n\\hypersetup{\r\n    colorlinks=false,\r\n    linkbordercolor=red,\r\n    pdfborderstyle={/S/U/W 1},\r\n    pdfauthor=Christophe Riccio,\r\n    pdftitle=GLM Manual\r\n}\r\n\r\n\\usemintedstyle{borland}\r\n\\newminted{cpp}{linenos, bgcolor=beige}\r\n\\newminted{glsl}{linenos, bgcolor=beige}\r\n\r\n\\begin{document}\r\n% Set up the maketitle command\r\n\\author{Christophe Riccio}\r\n\\subtitle{Version 0.9.7}\r\n\r\n\\title{GLM Manual}\r\n\\date{\\today{}} % You can remove \\today{} and type a date manually\r\n\r\n\\maketitle{} % Generates title\r\n\r\n\\pagebreak{}\r\n\r\n\\section*{Licensing}\r\n\r\n\\subsection*{\\hypertarget{happybunny}{The Happy Bunny License (Modified MIT License)}}\r\n\r\n\\copyright{} 2008 - 2015 G-Truc Creation\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nRestrictions: By making use of the Software for military purposes, you choose to make a Bunny unhappy.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n\\pagebreak{}\r\n\r\n\\subsection*{\\hypertarget{mit}{The MIT License}}\r\n\\copyright{} 2008 - 2015 G-Truc Creation\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n\\pagebreak{}\r\n\r\n\\addcontentsline{toc}{section}{Introduction}\r\n\\tableofcontents{}\r\n\r\n\\pagebreak{}\r\n\r\n\\section*{Introduction}\r\n\r\nOpenGL Mathematics (GLM) is a C++ mathematics library for graphics C++ programs based on the \\href{http://www.opengl.org/registry/}{OpenGL Shading Language} (GLSL) specifications.\r\n\r\nGLM provides classes and functions designed and implemented with the same naming conventions and functionalities than GLSL so that when a programmer knows GLSL, he knows GLM as well which makes it really easy to use.\r\n\r\nThis project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...\r\n\r\nThis library works perfectly with \\href{http://www.opengl.org}{OpenGL} but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (ray-tracing/rasterisation), image processing, physic simulations and any other development context that requires a simple and convenient mathematics library.\r\n\r\nGLM is written in C++98, but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependencies and it officially supports the following compilers:\r\n\r\n\\begin{itemize}\r\n  \\item \\href{https://developer.apple.com/Library/mac/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html}{Apple Clang} 4.0 and higher\r\n  \\item \\href{http://gcc.gnu.org/}{GCC} 4.2 and higher\r\n  \\item \\href{https://software.intel.com/en-us/intel-compilers}{Intel C++ Composer} XE 2013 and higher\r\n  \\item \\href{http://llvm.org/}{LLVM} 3.0 and higher\r\n  \\item \\href{http://www.visualstudio.com/}{Visual C++} 2010 and higher\r\n  \\item \\href{https://developer.nvidia.com/about-cuda}{CUDA} 4.0 and higher (experimental)\r\n  \\item Any conforming C++98 or C++11 compiler\r\n\\end{itemize}\r\n\r\nThe source code and the documentation, including this manual, are licensed under the \\hyperlink{happybunny}{Happy Bunny License (Modified MIT)} and the \\hyperlink{mit}{MIT License}.\r\nThanks for contributing to the project by submitting reports for bugs and feature requests. Any feedback is welcome at glm@g-truc.net.\r\n\r\n\r\n\\section{Getting started}\r\n\\subsection{Setup}\r\nGLM is a header-only library. Hence, there is nothing to build to use it. To use GLM, a programmer only has to include \\verb|<glm/glm.hpp>| in his program. This include provides all the GLSL features implemented by GLM.\r\n\r\nCore GLM features can be included individually to reduce compilation times.\r\n\r\n\\begin{itemize}\r\n\\item \\verb|<glm/vec2.hpp>|: \\verb|vec2|, \\verb|bvec2|, \\verb|dvec2|, \\verb|ivec2| and \\verb|uvec2|\r\n\\item \\verb|<glm/vec3.hpp>|: \\verb|vec3|, \\verb|bvec3|, \\verb|dvec3|, \\verb|ivec3| and \\verb|uvec3|\r\n\\item \\verb|<glm/vec4.hpp>|: \\verb|vec4|, \\verb|bvec4|, \\verb|dvec4|, \\verb|ivec4| and \\verb|uvec4|\r\n\\item \\verb|<glm/mat2x2.hpp>|: \\verb|mat2|, \\verb|dmat2|\r\n\\item \\verb|<glm/mat2x3.hpp>|: \\verb|mat2x3|, \\verb|dmat2x3|\r\n\\item \\verb|<glm/mat2x4.hpp>|: \\verb|mat2x4|, \\verb|dmat2x4|\r\n\\item \\verb|<glm/mat3x2.hpp>|: \\verb|mat3x2|, \\verb|dmat3x2|\r\n\\item \\verb|<glm/mat3x3.hpp>|: \\verb|mat3|, \\verb|dmat3|\r\n\\item \\verb|<glm/mat3x4.hpp>|: \\verb|mat3x4|, \\verb|dmat3x4|\r\n\\item \\verb|<glm/mat4x2.hpp>|: \\verb|mat4x2|, \\verb|dmat4x2|\r\n\\item \\verb|<glm/mat4x3.hpp>|: \\verb|mat4x3|, \\verb|dmat4x3|\r\n\\item \\verb|<glm/mat4x4.hpp>|: \\verb|mat4|, \\verb|dmat4|\r\n\\item \\verb|<glm/common.hpp>|: all the GLSL common functions\r\n\\item \\verb|<glm/exponential.hpp>|: all the GLSL exponential functions\r\n\\item \\verb|<glm/geometry.hpp>|: all the GLSL geometry functions\r\n\\item \\verb|<glm/integer.hpp>|: all the GLSL integer functions\r\n\\item \\verb|<glm/matrix.hpp>|: all the GLSL matrix functions\r\n\\item \\verb|<glm/packing.hpp>|: all the GLSL packing functions\r\n\\item \\verb|<glm/trigonometric.hpp>|: all the GLSL trigonometric functions\r\n\\item \\verb|<glm/vector_relational.hpp>|: all the GLSL vector relational functions\r\n\\end{itemize}\r\n\r\n\\subsection{Faster program compilation}\r\nGLM is a header-only library that heavily uses C++ templates, which may significantly increase the compile time for files that use GLM. Hence, GLM functionality should be included only by files that actually use it.\r\n\r\nTo further reduce compilation time, GLM 0.9.5 introduced forward declarations of all types through the header \\verb|<glm/fwd.hpp>|.\r\n\r\n\\begin{cppcode}\r\n// Header file\r\n#include <glm/fwd.hpp>\r\n\\end{cppcode}\r\n\r\n\\begin{cppcode}\r\n// Source file\r\n#include <glm/glm.hpp>\r\n\\end{cppcode}\r\n\r\n\\subsection{Example usage of core GLM}\r\n\r\n\\begin{cppcode}\r\n// Include GLM core features\r\n#include <glm/vec3.hpp>\r\n#include <glm/vec4.hpp>\r\n#include <glm/mat4x4.hpp>\r\n\r\n// Include GLM extensions\r\n#include <glm/gtc/matrix_transform.hpp>\r\n\r\nusing glm::vec2;\r\nusing glm::vec3;\r\nusing glm::mat4;\r\n\r\nmat4 transform(\r\n  vec2 const & Orientation, \r\n  vec3 const & Translate,\r\n  vec2 const & Up)\r\n{\r\n  mat4 Projection = glm::perspective(45.0f, 4.0f/3.0f, 0.1f, 100.0f);\r\n  mat4 ViewTranslate = glm::translate(mat4(1.0f), Translate);\r\n  mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up);\r\n  mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up);\r\n  mat4 Model = mat4(1.0f);\r\n\t\t\r\n  return Projection * View * Model;\r\n}\r\n\\end{cppcode}\r\n\r\n\r\n\\subsection{Dependencies}\r\n\r\nWhen \\verb|<glm/glm.hpp>| is included, GLM will provide all standard GLSL features.\r\n\r\nGLM does not depend on external libraries or external headers such as \\verb|gl.h|, \\cprotect{\\href{http://www.opengl.org/registry/api/GL/glcorearb.h}}{\\verb|glcorearb.h|}, \\verb|gl3.h|, \\verb|glu.h| or \\verb|windows.h|. However, if \\verb|<boost/static_assert.hpp>| is included, then  \\href{http://www.boost.org/doc/libs/release/libs/static_assert/}{Boost.StaticAssert}  will be used to provide compile-time errors.  Otherwise, if using a C++11 compiler, the standard \\verb|static_assert| will be used instead. If neither is available, GLM will use its own implementation of \\verb|static_assert|.\r\n\r\n\\end{document}\r\n```\r\n\r\nIs this something you'd want me to move forward with?"}}