Download GLM 0.9.3.0</a></div></div><br/><divclass="menu2"><ahref="./index.html">Front page</a></div><divclass="menu2"><ahref="./download.html">Downloads</a></div><divclass="menu2"><ahref="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br/><divclass="menu2"><ahref="./glm.pdf">GLM Manual</a></div><divclass="menu2"><ahref="./api/index.html">GLM API</a></div><divclass="menu2"><ahref="./code.html">Code samples</a></div><divclass="menu2"><ahref="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><divclass="menu2"><ahref="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br/><divclass="menu2"><ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><divclass="menu2"><ahref="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><divclass="menu2"><ahref="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><divclass="menu2"><ahref="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><divclass="menu2"><ahref="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br/><br/><divclass="menu2"><ahref="http://www.g-truc.net"><imgclass="menu-img"src="./common/g-truc.png"alt="G-Truc"/></a></div><br/></td><tdclass="page"><divclass="title1"><imgsrc="./common/title.png"alt="OpenGL Mathematics"/></div><divclass="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br/>A C++ mathematics library for graphics programming<br/></div><br/><br/><div><divclass="title-date"></div><divclass="title4"></div><div><p>
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
based on the <ahref="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
</p><p>
@ -32,4 +32,4 @@
Thanks for contributing to the project by <ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets</a> for bug reports and feature requests. (SF.net account required).
Any feedback is welcome at glm@g-truc.net.
</p><divxmlns="http://www.w3.org/1999/xhtml"><spanclass="list">GLM 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 dependence and officially supports the following compilers:</span><ul><li><axmlns=""href="http://clang.llvm.org">Clang</a> 2.6 and higher</li><li><axmlns=""href="http://developer.nvidia.com/category/zone/cuda-zone">CUDA</a> 3.0 and higher
</li><li><axmlns=""href="http://gcc.gnu.org/">GCC</a> 3.4 and higher</li><li><axmlns=""href="http://llvm.org/">LLVM</a> 2.3 through GCC 4.2 front-end and higher</li><li><axmlns=""href="http://msdn.microsoft.com/en-us/visualc/default">Visual C++</a> 2005 and higher</li><li>Any conform C++98 or C++11 compiler</li></ul></div></div><divclass="news-separator">_________________</div><br/></div><divclass="email"><imgsrc="./common/email.png"alt="email not available as text"/></div><divclass="news-separator">_________________</div><br/><divclass="title3">Copyright Š 2005 - 2011<ahref="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
</li><li><axmlns=""href="http://gcc.gnu.org/">GCC</a> 3.4 and higher</li><li><axmlns=""href="http://llvm.org/">LLVM</a> 2.3 through GCC 4.2 front-end and higher</li><li><axmlns=""href="http://msdn.microsoft.com/en-us/visualc/default">Visual C++</a> 2005 and higher</li><li>Any conform C++98 or C++11 compiler</li></ul></div></div><divclass="news-separator">_________________</div><br/></div><divclass="email"><imgsrc="./common/email.png"alt="email not available as text"/></div><divclass="news-separator">_________________</div><br/><divclass="title3">Copyright Š 2005 - 2012<ahref="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
</div></div><divclass="news-separator">_________________</div><br/><divclass="email"><imgsrc="./common/email.png"alt="email not available as text"/></div><divclass="news-separator">_________________</div><br/><divclass="title3">Copyright Š 2005 - 2011<ahref="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
</div></div><divclass="news-separator">_________________</div><br/><divclass="email"><imgsrc="./common/email.png"alt="email not available as text"/></div><divclass="news-separator">_________________</div><br/><divclass="title3">Copyright Š 2005 - 2012<ahref="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
Download GLM 0.9.3.0</a></div></div><br/><divclass="menu2"><ahref="./index.html">Front page</a></div><divclass="menu2"><ahref="./download.html">Downloads</a></div><divclass="menu2"><ahref="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br/><divclass="menu2"><ahref="./glm.pdf">GLM Manual</a></div><divclass="menu2"><ahref="./api/index.html">GLM API</a></div><divclass="menu2"><ahref="./code.html">Code samples</a></div><divclass="menu2"><ahref="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><divclass="menu2"><ahref="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br/><divclass="menu2"><ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><divclass="menu2"><ahref="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><divclass="menu2"><ahref="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><divclass="menu2"><ahref="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><divclass="menu2"><ahref="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br/><br/><divclass="menu2"><ahref="http://www.g-truc.net"><imgclass="menu-img"src="./common/g-truc.png"alt="G-Truc"/></a></div><br/></td><tdclass="page"><divclass="title1"><imgsrc="./common/title.png"alt="OpenGL Mathematics"/></div><divclass="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br/>A C++ mathematics library for graphics programming<br/></div><br/><br/><p>
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
based on the <ahref="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
</p><p>
@ -34,7 +34,29 @@
<p>
Thanks for contributing to the project by <ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets</a> for bug reports and feature requests. (SF.net account required).
GLM 0.9.3.0 is finally released. Since the branch 0.9.2, the test bench and the Doxygen API documentation has been expend.
</p><p>
Swizzle operators are a challenging task to implement but thanks to the effort of many contributors, GLM 0.9.3.0 provides finally something interesting even if
not perfect but still a great improvement considering the incompatibilities with some external libraries. GLM 0.9.3 provides two implemetanations, one for C++ 98
compilers and one for C++ 11 compilers providing an implemetnation closer to what GLSL does. Indeed the C++ 98 implementation is compatible with C++ 11 compilers.
</p><spanxmlns="http://www.w3.org/1999/xhtml"class="code-title">Implementation for C++ 98 compilers</span><ulxmlns="http://www.w3.org/1999/xhtml"class="code-list"><liclass="code-line"><spanclass="code-line-content"><spanclass="comment">// To declare before including glm.hpp, to use the swizzle operators</span></span></li><liclass="code-line"><spanclass="code-line-content"><spanclass="keyword">#define </span> GLM_SWIZZLE
For now, there isn't detailed documentation, but you can freely have a look on GLSL specifications. Consider any incoherence with GLM as an error. Keep in mind the library is included in the namespace "glm".
</p><p>
This project is multi platform and was successfully tested under Visual C++ 7.1, MinGW 3.4 and GCC 3.4.
GLM 0.9.3.0 is finally released. Since the branch 0.9.2, the test bench and the Doxygen API documentation has been expend.
</paragraph>
<paragraph>
Swizzle operators are a challenging task to implement but thanks to the effort of many contributors, GLM 0.9.3.0 provides finally something interesting even if
not perfect but still a great improvement considering the incompatibilities with some external libraries. GLM 0.9.3 provides two implemetanations, one for C++ 98
compilers and one for C++ 11 compilers providing an implemetnation closer to what GLSL does. Indeed the C++ 98 implementation is compatible with C++ 11 compilers.
</paragraph>
<codetitle="Implementation for C++ 98 compilers">
<line>
<comment>// To declare before including glm.hpp, to use the swizzle operators</comment>
</line>
<line>
<keyword>#define </keyword> GLM_SWIZZLE
</line>
<line>
<keyword>#include </keyword>
<string><glm/glm.hpp></string>
</line>
<line>
</line>
<line>
<keyword>void</keyword> example_cpp98()
</line>
<line>
{
</line>
<linealign="32px">
glm::vec4 a = glm::vec4(2, 0, 0, 0);
</line>
<linealign="32px">
glm::vec4 b = glm::vec4(0, 2, 0, 0);
</line>
<linealign="32px">
glm::vec3 c = (a.zyx() + b.xyz()) * 0.5f;
</line>
<linealign="32px">
glm::vec2 d = glm::normalize(glm::vec2(c.yz()));
</line>
<linealign="32px">
a.xyzw = d.xyxy;
</line>
<line>
}
</line>
</code>
<codetitle="Implementation for C++ 11 compilers">
<line>
<comment>// To declare before including glm.hpp, to use the swizzle operators</comment>