quaternions, half-based types, random numbers, etc...
</p><p>
This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDKs. It is a good candidate for software rendering (Raytracing / Rasterisation), image processing, physic simulations and any context that requires a simple and convenient mathematics library.
</p><divxmlns="http://www.w3.org/1999/xhtml"><spanclass="list">GLM is written as a platform independent library with no dependence and officially supports the following compilers:</span><ul><li><axmlns=""href="http://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 C++ compiler following C++98 norm</li></ul></div><p>
The source code is under the <ahref="./copying.txt">MIT license</a>.
</p><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.1.1 fixes some bugs, warnings on Clang C++ and clean up a bit the code.
</p><p>
If you have uncounter any issue with GLM 0.9.1.0, please download this revision.
</p><p>
Finally, the work has started for GLM 0.9.2 so if you have requests don't forget to <ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">submit them!</a></p>Download: <ahref="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download">GLM 0.9.1.1 (zip)</a><br/>Download: <ahref="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.7z/download">GLM 0.9.1.1 (7z)</a><br/>Link: <ahref="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</a><br/></div><br/></div><div><h3>03/03/2011 - GLM 0.9.1.0 final released</h3><div><p>
Finally, GLM 0.9.1 branch is reaching the status of stable with
This new version of GLM is bringing a lot of improvements and maybe too many considering the development time it has required:
API exposing SIMD implementation but also some new, safe and feature complet swizzling functions and a new setup API.
All this is described in the largely updated <ahref="http://glm.g-truc.net/glm-0.9.1.pdf">GLM manual</a>.
</p><p>
With the new setup system, GLM detects automatically the compiler settings to adapt its implementation to the flag set at build time.
It will automatically enable C++0x features, SSE optimizations and the display configuration informations at build-time.
The automatic setup can be overdrive by the GLM user.
</p><p>
The SIMD API maintly focus on vec4 and mat4 implementations that are embodied by the types <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdVec4</span> and <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdMat4</span>.
The implemention cover most of the common functions, the geometry functions and the matrix functions as described in the GLSL specifications.
Because it is hight inefficient to access individual components of a SIMD register, the <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdVec4</span> doesn't allow it.
To reflect this constraint, the <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdVec4</span> has to be converted to <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">vec4</span> first which would be effectively handle
by the compiler thank to the function <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdCast</span>.
Furthermore, GLM provides some specials functions like simdDot4 that returns a <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">simdVec4</span> instead of a float
with the duplicated dot product value in each components
and ensure that no unnecessary component manipulations are performed (typically <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">__m128</span> to <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">float</span>
and <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">float</span> to <spanxmlns="http://www.w3.org/1999/xhtml"class="codeword">__m128</span>).
This implementation can probably be improve in many ways so don't hesitate to send me some feedbacks.
</p><p>
GLM 0.9.1 is not 100% backward compatible with GLM 0.9.0 but mostly advanced usages should be concerned by this compatibility issues.
It also contains a contribution by Arnaud Masserann, a autoexp.dat file to make GLM looks nicer in Visual Studio debugger.
To take advantage of this file, edit ${VISUALSTUDIO_DIRECTORY}/common7/packages/debugger/autoexp.dat file and add the content of the file util/autoexp.txt
By the way, if you have questions about GLM, a good place for those is the <ahref="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a>.
This version brings to main changed: Stable extensions and a new extension system.
</p><p>
The first stable GLM extensions are: GLM_GTC_double_float and GLM_GTC_half_float for higher and lower vectors and matrices floating point precision. GLM_GTC_matrix_operation provides determinant and inverse matrix calculation. GLM_GTC_matrix_transform allows to build scale, rotate and translate matrices and GLM_GTC_matrix_projection provides varius functions to build projection matrices. Few stable extensions yet but the number is going to grow with the next release!
</p><p>
Both GLM 0.8.2.x extensions use method are deprecated (but still working) and replace by a new one. If you wnat to use GLM_GTC_half_float just include "glm/gtc/half_float.hpp" and it is going to be included in GLM namespace.
</p><p>
Finally, quite some file have been renamed, using "hpp" instead of ".h". Old file have been deprecated but are still available so that GLM 0.8.3.0 is fully compatible with GLM 0.8.2.x.
GLM 0.8.0 is released. This new version is now based on GLSL 1.30 specification which provided new functions and precision qualifiers.
</p><p>
Beyond this, lot of changes have been done to make GLM easier to use, easier to develop, more reliable, more conform to C++ ISO98 standard and GLSL specifications.
</p><p>
It involves that GLM 0.8.x is not backward compatible with GLM 0.7.x... However, an application port from GLM 0.7.x to GLM 0.8.x isn't a huge work and actually for some, it won’t be work at all.
</p><p>
On GLM core side, based on GLSL features, vector types can't be automatically cast to pointer anymore for code safety purposes. Vector constructors require a single scalar parameter of the exact number of components.
</p><p>
On GLM extension side, the mechanism to use them has changed. The old [__]***GTX way doesn't exist anymore. Have a look on the manual for more information.
</p><p>
Have a look on the manual and the changelog for more information. Don't forget to send your <ahref="./about.html">feedback</a> and enjoy!
</p>Download: <ahref="http://prdownloads.sourceforge.net/glf/glm-0.8.0.zip?download">GLM 0.8.0 (zip, 936 KB)</a><br/>Download: <ahref="http://prdownloads.sourceforge.net/glf/glm-0.8.0.7z?download">GLM 0.8.0 (7z, 370 KB)</a><br/>Link: <ahref="./glm-manual.pdf">GLM 0.8.0 Manual</a><br/>Link: <ahref="./changelog.html">Full changelog</a><br/>Link: <ahref="http://www.ozone3d.net/smf/index.php/topic,1682.0.html">Post a comment</a><br/></div><br/></div><div><h3>22/10/2008 - A Humus demo to feature GLM 0.8.0</h3><div><p>
Ambient aperture lighting <ahref="http://www.humus.name">Humus</a> demo have been updated to use GLM as math library.
</p>Download: <ahref="http://prdownloads.sourceforge.net/glf/AmbientApertureLighting.zip?download">Updated demo + all sources (zip, 2.38 MB)</a><br/>Download: <ahref="http://www.humus.name/3D/AmbientApertureLighting.zip">Original demo (zip, 1.40 MB)</a><br/>Link: <ahref="http://www.ozone3d.net/smf/index.php/topic,1681.0.html">Post a comment</a><br/></div><br/></div><div><h3>18/10/2008 - Webside updated</h3><div><p>
As you can see the website get a little update to prepare GLM 0.8.0 final release.
</p><p>
GLM 0.8.0 final should be release during the week.
This release fixes some bugs and add few features though extensions. The development is now based on <ahref="http://www.cmake.org">CMake</a> to make easier cross platform tests and project management.
This release mainly improves half float vectors support. By default the low precission vectors are based on float numbers not on half numbers
</p><p>
It also provides new setup options. GLM_USE_ONLY_XYZW to disable multiple names to access to a single vector component. GLM_USE_ANONYMOUS_UNION to allow multiple component names on half vectors with Visual C++.
</p><p>
Various bugs and updates of extensions have been done too. Final release is coming...
GLM have been updated to support GLSL 1.30. API documentation had significant improvements to make easier finding of GLSL functions and types.
</p><p>
GLM 0.8.x is NOT backward compatible with GLM 0.7.x. Upgrade to GLM 0.8.x could involve build errors for the following cases: A lot of improvements have been made to increase the conformance with GLSL specification. Lot of GLSL 1.30 features were already exposed in extensions that have been deleted. The extension syntaxe based on ARB convension is no long used.
</p><p>
Due to the number of changes GLM 0.8.0 is release as beta first. The final release is schedule for october.
GLM 0.7.6 provides a better C++ conformance so that you can build GLM with –pedantic G++ parameter or without Visual Studio extensions. To make GLM more reliable, BOOST_STATIC_ASSERT are used according developer wishes.
GLM 0.7.5 is available and introduces a new build messsage system to get information of GLM build configuration with Visual Studio. This mechanism is documented in section 6 of GLM manual. Also, GLM can be built with GCC pedantic options.
GLM 0.7.4 introduces a new system to manage external dependencies.
</p><p>
It allows developing extension using external dependencies like GLEW, Boost, etc. without making required those dependencies for GLM programmer that doesn't need those external dependent extensions.
</p><p>
The mechanism is described into the updated manual.
GLM 0.7.2 is released. The documentation have been completed again and several issues handle with precompiler options.
</p><p>
#define GLM_SWIZZLE GLM_SWIZZLE_FUNC allows to use swizzle operators with internal functions. For example, glm::vec3(1, 2, 3).zyx is replaced by glm::vec3(1, 2, 3)._zyx() with this option.
</p><p>
#define GLM_FORCE_NO_HALF allows to include all extensions (#include "glm/glmext.h") without any support of half-precision floating-point numbers.
</p><p>
#define GLM_AUTO_CAST GLM_DISABLE allows to disable automatic cast (eg: glLoadMatrixf(glm::mat4(1.0))) which could involve unfortunate issues in some cases.
</p><p>
More information on these topic are available in GLM manual section 5 "Known issues".
GLM 0.7.0 is available under MIT license. LGPL lisence have been discard due to an issue of use for console development. This release contains a lot better documentation based on Doxygen. Lot of bugs have been fixed and the documentation completed. Thanks to all people that has contributed thought bug reports and ideas to make this version a lot better!
GLM 0.6.0 is available. For this release, work focus on extensions. A new mecanisum allows to integrate GLM extensions as it is actually done for GLSL extension by vendors. Lot of new extensions have been added.
A new sample is available. It's an update of Philip Rideout's Catmull Clark subdivision program that uses GLM. Released with pleasant permission of <ahref="http://prideout.net">Philip Rideout</a>.
This release include GLSL 1.2 new feature in the core implementation. Also, it includes swizzle read and write operators and a custom options system to setup GLM.
</p><p>
It includes some new extensions to extend GLSL features but they remain experimental. The next release should provide the first stable extensions.
</p><p>
The GLM 0.5.0 packages contain some basic samples and some documentation. The ray tracer sample has been updated to GLM 0.5.0. Except for specific cases, especially with extensions, GLM 0.5 is backward compatible.
</p><p>
Now, GLM development is taking advantages of <ahref="http://www.sf.net">SourceForge.net</a> services: a <ahref="https://sourceforge.net/tracker/?group_id=129808&atid=901445">bug tracker system</a> and the development source code is publicly available on <ahref="https://svn.sourceforge.net/svnroot/glf">SF.net SVN server</a>.
A GLM update is available. It simply includes some examples for a sweet start with GLM.
</p><p>
The examples show how to use GLM with OpenGL intermediate mode and OpenGL vertex arrays. Also, they show how to use GLM extensions to replace GLU and OpenGL function witch could slightly increase performances by decreasing the number of OpenGL states changes.
This release introduces first GLSL 1.2 features as planed. Also, various new extensions have been added and updated. Finally, it's not anymore required to include windows.h before glm.h when windows.h is required.
</p><p>
The number of features of GLM, including extensions, start to really increase the compilation time. That's why it's recommended to use precompiled headers.
</p>Download: <ahref="http://prdownloads.sourceforge.net/glf/glm-0.4.0.zip?download">GLM 0.4.0</a><br/></div><br/></div><div><h3>23/04/2006 - Roadmap for the years</h3><div><p>
Version 0.4 will complete matrices and vectors operators and will add GLSL 1.2 features. First, conversions simplifications will be integrated. Then, 4 per 3 matrices and outer product will be available from extensions. The transpose function is already available from extension.
</p><p>
Version 0.5 will integrate GLSL 1.2 features to GLM core.
</p><p>
Version 0.6 will add swizzle operators in reading and writing. (eg: vec3 v1(1.0, 2.0, 3.0); vec3 v2 = v1.xxx; v1.zyx = v;).
This release corrects two main bugs. First, a bug of the imat4 and mat4 division operators and other correct the vectors components access from texture coordinate way.
A new release of GLM is now available. It improves GLSL data type conversion and construction compliance. Also, It's adds extensions like some to manage double-precision and half-precision float numbers. Finally a Doxygen documentation has been added.
</p><p>
This new release have been tested under Visual C++ 7.1, Visual C++ 8.0, GCC 3.2.3 et GCC 3.4.2.
A new release of GLM is now available. A few bugs have been fixed, the portability of GLSL into C++ has been improved, and new experimental extensions have been implemented, enhancing GLSL features.
</p><p>
Project now supports quaternions, adds new features to handle colors, vectors and matrices. For example, GLM allows base colors changing, vector projected operations, and 2D/3D transforms.
</p><p>
To demo the features of this new version, a sample program is included. It is a simple Ray Tracer supporting reflected and refracted rays, three lights types (point, directionnal and spot), two objects types (sphere, plan), using all of the GLM possibilities.
</p></div><br/></div><div><h3>04/05/2005 - English pages</h3><div><p>
The english section of this site is now available.
</p></div><br/></div><div><h3>21/02/2005 - GLM 0.1 is available</h3><div><p>
This is the first public availability of GLM. This library supports part of GLSL specifications : All vectors and matrices types, and all the operators and associated functions.
</p><p>
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.