diff --git a/copying.txt b/copying.txt index 9c8fbf98..058348f1 100644 --- a/copying.txt +++ b/copying.txt @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2005 - 2010 G-Truc Creation +Copyright (c) 2005 - 2011 G-Truc Creation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/coreModules.doxy b/doc/coreModules.doxy index c67a45ab..1961ff71 100644 --- a/doc/coreModules.doxy +++ b/doc/coreModules.doxy @@ -16,7 +16,7 @@ /*! - \defgroup core_types Core Types + \defgroup core_types Types \brief The standard types defined by the specification. @@ -27,7 +27,7 @@ **/ /*! - \defgroup core_precision Core Precision Types + \defgroup core_precision Precision types \brief Non-GLSL types that are used to define precision-based types. @@ -44,17 +44,18 @@ **/ /*! - \defgroup core_template Core Template Types + \defgroup core_template Template types - \brief The generic template types used as the basis for the core types. + \brief The generic template types used as the basis for the core types. These types are all templates used to define the actual \ref core_types. + These templetes are implementation details of GLM types and should not be used explicitly. \ingroup core **/ /*! - \defgroup core_funcs Core Functions + \defgroup core_funcs Functions \brief The functions defined by the specification. diff --git a/doc/gtcModules.doxy b/doc/gtcModules.doxy index 2c1e4fc9..3c4e49d2 100644 --- a/doc/gtcModules.doxy +++ b/doc/gtcModules.doxy @@ -1,55 +1,48 @@ /*! \defgroup gtc GTC Extensions (Stable) - \brief Functions and types that GLSL does not provide, but are useful to have. + \brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program. - Core extensions differ from \ref gtx "experimental extensions" in that core extensions - are fairly stable. The API for experimental extensions is expected to change - significantly between versions. + GTC extensions aim to be stable. - Even if it's highly unrecommended, you can bring all of the extensions, by - including . Otherwise, you will have to include each extension - by including a specific file. + Even if it's highly unrecommended, it's possible to include all the extensions at once by + including . Otherwise, each extension needs to be included a specific file. **/ /*! - \defgroup gtc_half_float Half Float Core Extension + \defgroup gtc_half_float GLM_GTC_half_float: Half-precision floating-point based types and functions. \ingroup gtc - \brief Defines the half-float type, along with various typedefs for vectors and matrices. - - You must include to get this functionality. + Defines the half-precision floating-point type, along with various typedefs for vectors and matrices. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_matrix_access Matrix Access Core Extension + \defgroup gtc_matrix_access GLM_GTC_matrix_access: Access matrix rows and columns. \ingroup gtc - \brief Defines functions that allow you to access rows or columns of a matrix easily. - - You must include to get this functionality. + Defines functions to access rows or columns of a matrix easily. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_matrix_integer Integer Matrix Core Extension + \defgroup gtc_matrix_integer GLM_GTC_matrix_integer: Integer matrix types. \ingroup gtc - \brief Defines a number of matrices with integer types. - - You must include to get this functionality. + Defines a number of matrices with integer types. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_matrix_inverse Matrix Inverse Core Extension + \defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse: Additional matrix inverse function \ingroup gtc - \brief Defines additional matrix inverting functions. - - You must include to get this functionality. + Defines additional matrix inverting functions. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_matrix_transform Matrix Transform Core Extension + \defgroup gtc_matrix_transform GLM_GTC_matrix_transform: Matrix transform functions. \ingroup gtc \brief Defines functions that generate common transformation matrices. @@ -60,20 +53,20 @@ perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space. - You must include to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_quaternion Quaternion Core Extension + \defgroup gtc_quaternion GLM_GTC_quaternion: Quaternion types and functions \ingroup gtc \brief Defines a templated quaternion type and several quaternion operations. - You must include to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_type_precision Type Precision Core Extension + \defgroup gtc_type_precision GLM_GTC_type_precision: Vector and matrix types with defined precisions. \ingroup gtc \brief Defines specific C++-based precision types. @@ -81,11 +74,11 @@ \ref core_precision defines types based on GLSL's precision qualifiers. This extension defines types based on explicitly-sized C++ data types. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtc_type_ptr Pointer Access Core Extension + \defgroup gtc_type_ptr GLM_GTC_type_ptr: Memory layout access. \ingroup gtc \brief Used to get a pointer to the memory layout of a basic type. @@ -93,7 +86,7 @@ This extension defines an overloaded function, glm::value_ptr, which takes any of the \ref core_template "core template types". It returns a pointer to the memory layout of the object. Matrix types store their values - in row-major order. + in column-major order. This is useful for uploading data to matrices or copying data to buffer objects. @@ -102,6 +95,7 @@ \code #include #include + glm::vec3 aVector(3); glm::mat4 someMatrix(1.0); @@ -109,6 +103,6 @@ glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); \endcode - You must include the file to get this functionality. + need to be included to use these functionalities. **/ diff --git a/doc/gtxModules.doxy b/doc/gtxModules.doxy index f16a2849..8df24c9c 100644 --- a/doc/gtxModules.doxy +++ b/doc/gtxModules.doxy @@ -1,500 +1,498 @@ /*! \defgroup gtx GTX Extensions (Experimental) - \brief Functions and types that GLSL does not provide, but are useful to have. + \brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program. Experimental extensions are useful functions and types, but the development of their API and functionality is not necessarily stable. They can change substantially between versions. Backwards compatibility is not much of an issue for them. - Even if it's highly unrecommended, you can bring all of the extensions, by - including . Otherwise, you will have to include each extension - by including a specific file. + Even if it's highly unrecommended, it's possible to include all the extensions at once by + including . Otherwise, each extension needs to be included a specific file. **/ /*! - \defgroup gtx_associated_min_max Associated Min/Max Experimental Extension + \defgroup gtx_associated_min_max GLM_GTX_associated_min_max: Associated Min/Max \ingroup gtx \brief Min and max functions that return associated values not the compared onces. - - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_bit Bitwise Operations Experimental Extension + \defgroup gtx_bit GLM_GTX_bit: Extended bitwise operations \ingroup gtx \brief Allow to perform bit operations on integer values - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_closest_point Find Closest Point Experimental Extension + \defgroup gtx_closest_point GLM_GTX_closest_point: Find closest point \ingroup gtx \brief Find the point on a straight line which is the closet of a point. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_color_cast Color Conversion Experimental Extension + \defgroup gtx_color_cast GLM_GTX_color_cast: Color conversion \ingroup gtx \brief Conversion between two color types. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_color_space RGB to HSV Conversion Experimental Extension + \defgroup gtx_color_space GLM_GTX_color_space: RGB to HSV conversion \ingroup gtx \brief Related to RGB to HSV conversions and operations. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_color_space_YCoCg RGB to YCoCg Conversion Experimental Extension + \defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg: RGB to YCoCg conversion \ingroup gtx \brief RGB to YCoCg conversions and operations - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_compatibility Cg and HLSL Compatibility Experimental Extension + \defgroup gtx_compatibility GLM_GTX_compatibility: Cg and HLSL compatibility \ingroup gtx \brief Provide functions to increase the compatibility with Cg and HLSL languages - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_component_wise Component Wise Experimental Extension + \defgroup gtx_component_wise GLM_GTX_component_wise: Component wise \ingroup gtx \brief Operations between components of a type - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_epsilon Epsilon Comparison Experimental Extension + \defgroup gtx_epsilon GLM_GTX_epsilon: Epsilon comparison \ingroup gtx \brief Comparison functions for a user defined epsilon values. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_euler_angles Matrix From Euler Angles Experimental Extension + \defgroup gtx_euler_angles GLM_GTX_euler_angles: Matrix from euler angles \ingroup gtx \brief Build matrices from Euler angles. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_extend Position Extending Experimental Extension + \defgroup gtx_extend GLM_GTX_extend: Position extending \ingroup gtx \brief Extend a position from a source to a position at a defined length. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_extented_min_max Extended Min Max Experimental Extension + \defgroup gtx_extented_min_max GLM_GTX_extented_min_max: Extended min max \ingroup gtx \brief Min and max functions for 3 to 4 parameters. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_fast_exponential Fast Exponentiation Experimental Extension + \defgroup gtx_fast_exponential GLM_GTX_fast_exponential: Fast exponentiation functions \ingroup gtx \brief Fast but less accurate implementations of exponential based functions. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_fast_square_root Fast Square Root Experimental Extension + \defgroup gtx_fast_square_root GLM_GTX_fast_square_root: Fast square root functions \ingroup gtx \brief Fast but less accurate implementations of square root based functions. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_fast_trigonometry Fast Trig Experimental Extension + \defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry: Fast trigonometric functions \ingroup gtx \brief Fast but less accurate implementations of trigonometric functions. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_handed_coordinate_space Space Handedness Experimental Extension + \defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space: Space Handedness \ingroup gtx \brief To know if a set of three basis vectors defines a right or left-handed coordinate system. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_inertia Intertial Matrix Experimental Extension + \defgroup gtx_inertia GLM_GTX_inertia: Intertial matrix \ingroup gtx \brief Create inertia matrices - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_int_10_10_10_2 Packed Integer Experimental Extension + \defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2: Packed integer + \ingroup gtx + + \brief Pack vector to 1010102 integers. Storage only. + + need to be included to use these functionalities. +**/ + +/*! + \defgroup gtx_integer GLM_GTX_integer: Extended integer functions \ingroup gtx \brief Add support for integer for core functions - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_integer Integer Function Experimental Extension - \ingroup gtx - - \brief Add support for integer for core functions - - You must include the file to get this functionality. -**/ - -/*! - \defgroup gtx_intersect Intersection Test Experimental Extension + \defgroup gtx_intersect GLM_GTX_intersect: Intersection tests \ingroup gtx \brief Add intersection functions - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_log_base Log With Base Experimental Extension + \defgroup gtx_log_base GLM_GTX_log_base: Log with base \ingroup gtx \brief Logarithm for any base. base can be a vector or a scalar. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_matrix_cross_product Cross Product Matrices Experimental Extension + \defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product: Cross product matrix form \ingroup gtx \brief Build cross product matrices - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_matrix_major_storage Build Matrix Experimental Extension + \defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage: Build matrix \ingroup gtx \brief Build matrices with specific matrix order, row or column - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_matrix_operation Diagonal Matrix Experimental Extension + \defgroup gtx_matrix_operation GLM_GTX_matrix_operation: Extended matrix operations \ingroup gtx \brief Build diagonal matrices from vectors. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_matrix_query Query Matrix Properties Experimental Extension + \defgroup gtx_matrix_query GLM_GTX_matrix_query: Query matrix properties \ingroup gtx \brief Query to evaluate matrix properties - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_mixed_product Mixed Product Experimental Extension + \defgroup gtx_mixed_product GLM_GTX_mixed_producte: Mixed product \ingroup gtx \brief Mixed product of 3 vectors. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_multiple Multiples Experimental Extension + \defgroup gtx_multiple GLM_GTX_multiple: Multiples \ingroup gtx \brief Find the closest number of a number multiple of other number. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_norm Vector Norm Experimental Extension + \defgroup gtx_norm GLM_GTX_norm: Vector norm calculations \ingroup gtx \brief Various way to compute vector norms. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_normal Compute Normal Experimental Extension + \defgroup gtx_normal GLM_GTX_normal: Compute normals \ingroup gtx \brief Compute the normal of a triangle. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_normalize_dot Normalize Dot Product Experimental Extension + \defgroup gtx_normalize_dot GLM_GTX_normalize_dot: Normalize dot product \ingroup gtx \brief Dot product of vectors that need to be normalize with a single square root. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_number_precision Number Precision Experimental Extension + \defgroup gtx_number_precision GLM_GTX_number_precision: Number precision \ingroup gtx \brief Defined size types. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_ocl_type OpenCL Types Experimental Extension + \defgroup gtx_ocl_type GLM_GTX_ocl_type: OpenCL types \ingroup gtx \brief OpenCL types. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_optimum_pow Optimum Pow Experimental Extension + \defgroup gtx_optimum_pow GLM_GTX_optimum_pow: Optimum pow \ingroup gtx \brief Integer exponentiation of power functions. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_orthonormalize Orthonormalize Experimental Extension + \defgroup gtx_orthonormalize GLM_GTX_orthonormalize: Orthonormalize \ingroup gtx \brief Orthonormalize matrices. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_perpendicular Perpendicular Experimental Extension + \defgroup gtx_perpendicular GLM_GTX_perpendicular: Perpendicular \ingroup gtx \brief Perpendicular of a vector from other one - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_polar_coordinates Polar Coordinates Experimental Extension + \defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates: Polar coordinates \ingroup gtx \brief Conversion from Euclidean space to polar space and revert. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_projection Projection Experimental Extension + \defgroup gtx_projection GLM_GTX_projection: Projection \ingroup gtx \brief Projection of a vector to other one - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_quaternion Quaternion Experimental Extension + \defgroup gtx_quaternion GLM_GTX_quaternion: Extented quaternion types and functions \ingroup gtx - \brief Quaternion types and functions + \brief Extented quaternion types and functions - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_random Random Experimental Extension + \defgroup gtx_random GLM_GTX_random: Random \ingroup gtx \brief Generate random number from various distribution methods - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_raw_data Raw Data Experimental Extension + \defgroup gtx_raw_data GLM_GTX_raw_data: Raw data \ingroup gtx \brief Projection of a vector to other one - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_reciprocal Reciprocal Experimental Extension + \defgroup gtx_reciprocal GLM_GTX_reciprocal: Reciprocal \ingroup gtx \brief Define secant, cosecant and cotangent functions. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_rotate_vector Rotate Vector Experimental Extension + \defgroup gtx_rotate_vector GLM_GTX_rotate_vector: Rotate vector \ingroup gtx \brief Function to directly rotate a vector - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_simd_mat4 SIMD Mat4 Experimental Extension + \defgroup gtx_simd_mat4 GLM_GTX_simd_mat4: SIMD mat4 type and functions \ingroup gtx \brief SIMD implementation of mat4 type. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_simd_vec4 SIMD Vec4 Experimental Extension + \defgroup gtx_simd_vec4 GLM_GTX_simd_vec4: SIMD vec4 type and functions \ingroup gtx \brief SIMD implementation of vec4 type. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_spline Spline Experimental Extension + \defgroup gtx_spline GLM_GTX_spline: Spline \ingroup gtx \brief Spline functions - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_string_cast String Cast Experimental Extension + \defgroup gtx_string_cast GLM_GTX_string_cast: String cast \ingroup gtx \brief Setup strings for GLM type values - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_transform Transformation Matrices Experimental Extension + \defgroup gtx_transform GLM_GTX_transform: Extented transformation matrices \ingroup gtx \brief Add transformation matrices - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_transform2 Extra Transform Matrices Experimental Extension + \defgroup gtx_transform2 GLM_GTX_transform2: Extra transformation matrices \ingroup gtx \brief Add extra transformation matrices - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_unsigned_int Unsigned Int Experimental Extension + \defgroup gtx_unsigned_int GLM_GTX_unsigned_int: Unsigned int \ingroup gtx \brief Add support for unsigned integer for core functions - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_vector_access Vector Access Experimental Extension + \defgroup gtx_vector_access GLM_GTX_vector_angle: Vector access \ingroup gtx \brief Function to set values to vectors - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_vector_angle Vector Angle Experimental Extension + \defgroup gtx_vector_angle GLM_GTX_vector_angle: Vector angle \ingroup gtx \brief Compute angle between vectors - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_vector_query Vector Query Experimental Extension + \defgroup gtx_vector_query GLM_GTX_vector_query: Vector query \ingroup gtx \brief Query informations of vector types - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_verbose_operator Verbose Operator Experimental Extension + \defgroup gtx_verbose_operator GLM_GTX_verbose_operator: Verbose operator \ingroup gtx \brief Use words to replace operators - You must include the file to get this functionality. + need to be included to use these functionalities. **/ /*! - \defgroup gtx_wrap Wrap Experimental Extension + \defgroup gtx_wrap GLM_GTX_wrap: Texture coordinate wrap modes \ingroup gtx - \brief Wrapping mode using my texture samping. + \brief Wrapping mode of texture coordinates. - You must include the file to get this functionality. + need to be included to use these functionalities. **/ diff --git a/doc/pages.doxy b/doc/pages.doxy index 58c91d79..0e5a9f9f 100644 --- a/doc/pages.doxy +++ b/doc/pages.doxy @@ -21,7 +21,8 @@ The source code is licenced under the MIT licence. - Thanks for contributing to the project by submitting tickets for bug reports and feature requests. (SF.net account required). Any feedback is welcome at glm@g-truc.net. + Thanks for contributing to the project by submitting tickets for bug reports and feature requests. + (SF.net account required). Any feedback is welcome at glm@g-truc.net. \li \subpage pg_started \li \subpage pg_advanced @@ -44,7 +45,7 @@ GLM makes heavy usages of C++ templates. This design may significantly increase the compile time for files that use GLM. Precompiled headers are recommended to avoid this issue. - \section started_sample Use Sample of GLM Core + \section started_sample Use Sample of GLM \code #include @@ -60,31 +61,31 @@ int foo() \section started_structure Library Structure - GLM is arranged in 3 distinct segments. These are the GLM core, - core extensions, and experimental extensions. + GLM is arranged in 2 distinct segments. These are the GLM features based on the GLSL specification and a set of extensions. + Some extensions are stable and backward compatible (\ref gtc GTC \ref virtrev VIRTREV) but some are experimental (\ref gtx GTX) + which means that they are not guarantee to be backward compatible from version to version. - The \ref core "GLM core" represents only what GLSL's core provides in terms of types and functions + The \ref core "GLM" represents only what GLSL's core provides in terms of types and functions (to the best of GLM's ability to replicate them). All that is needed to use the core is to #include . - \ref gtc "Core extensions" are sets of functions and types that add onto the core. + \ref gtc "GTC extensions" are functions and types that add onto the core. These are considered reasonably stable, with their APIs not changing much between versions. Each core extension is included with a separated header file include. All of the core extensions are in the "glm/gtc" directory. - \ref gtx "Experimental extensions" are sets of functions and types that add onto the - core. Unlike core extensions, their APIs are not considered particularly stable, which - is why they are "experimental". All of the experimental extensions are in the - "glm/gtx" directory. Like core extensions, each experimental extension is included + \ref gtx "GTX extensions" are functions and types that add onto the + core. Unlike GTC extensions, their APIs are not considered particularly stable, which + is why they are marked "experimental". Like GTC extensions, each experimental extension is included with a separate header file. - If you want to use all extensions by default, you may #include . - This includes all extensions, core and experimental. + All the extensions can be included at once by default with #include + but this is not recommanded as it will reduce compilation speed for many unused features. - All of GLM is defined as direct children of the glm namespace, including extensions. Note that some extensions are incompatible with other extensions; this may result in C++ name collisions when used together. + All of GLM is defined as direct children of the glm namespace, including extensions. To use a particular extension, simply include the extension header file. All - extension features are added to the glm namespace. + extension features are added to the glm namespace automatically. \code #include @@ -116,7 +117,7 @@ int foo() like so: glUniform3fv(loc, 1, glm::vec3(0)). However, this is not the case; the vector and matrix types are C++ classes, not arrays. - Instead, GLM provides a mechanism to get the contents of a vector or matrix as + Instead, GLM provides a mechanism to get the content of a vector or matrix as an array pointer. The \ref gtc_type_ptr extension provides this ability. \code @@ -135,7 +136,7 @@ void BindUniforms(GLuint uniVec, GLuint uniMat) Notice that all matrix types are column-major rather than row-major. Hence the need to pass GL_FALSE to glUniformMatrix4fv. - Alternatively, one can simply dereference the first element of the type. + Alternatively, the first element of the type can be dereferenced. \code #include @@ -150,18 +151,21 @@ void BindUniforms(GLuint uniVec, GLuint uniMat) } \endcode - As you can see, this requires dereferencing the very first basic type of the object, not merely the first element. The [] operator on the matrix type returns a column vector; one must then access the first element of that column vector to get a pointer to the basic type. + This method requires dereferencing the very first basic type of the object, not merely the first element. + The [] operator on the matrix type returns a column vector; one must then access the first element of that column vector to get a pointer to the basic type. - \note This operation could have been built into the base vector and matrix types and performed with a cast operator. However, this has some downsides. Implicit casts - can cause unexpected and unwanted behavior. + \note This operation could have been built into the base vector and matrix types and performed with a cast operator. + However, this has some downsides. Implicit casts can cause unexpected and unwanted behavior. **/ /*! - \page pg_advanced Advaned Usage + \page pg_advanced Advanced Usage \section advanced_swizzle Swizzle Operators - A common feature of shader languages like GLSL is components swizzling. This involves being able to select which components of a vector are used and in what order. For example, "variable.x", "variable.xxy", "variable.zxyy" are examples of swizzling. + A common feature of shader languages like GLSL is components swizzling. + This involves being able to select which components of a vector are used and in what order. + For example, "variable.x", "variable.xxy", "variable.zxyy" are examples of swizzling. \code vec4 A; @@ -171,18 +175,22 @@ B.yx = A.wy; B = A.xx; \endcode - This functionally turns out to be really complicated to implement in C++ using the exact GLSL conventions. GLM provides 2 implementions this feature. + This functionally turns out to be really complicated to implement in C++ using the exact GLSL conventions. + GLM provides 2 implementions this feature. \subsection advanced_swizzle_macro Macro implementation - The first implementation follows the GLSL convensions accurately. It uses macros to achieve this, which might generates name conflicts with system headers or third party libraries. Therefore, it is disabled by default. To enable this implementation, GLM_SWIZZLE must be defined before any inclusion of . + The first implementation follows the GLSL convensions accurately. + It uses macros to achieve this, which might generates name conflicts with system headers or third party libraries. + Therefore, it is disabled by default. To enable this implementation, GLM_SWIZZLE must be defined before any inclusion of . \code #define GLM_SWIZZLE #include \endcode - This implementation can be partially enabled by defining GLM_SWIZZLE_XYZW, GLM_SWIZZLE_RGBA or GLM_SWIZZLE_STQP. Each macro only enable a set of swizzling operators. For example we can only enable x,y,z,w and s,t,q,p operators using: + This implementation can be partially enabled by defining GLM_SWIZZLE_XYZW, GLM_SWIZZLE_RGBA or GLM_SWIZZLE_STQP. + Each macro only enable a set of swizzling operators. For example we can only enable x,y,z,w and s,t,q,p operators using: \code #define GLM_SWIZZLE_XYZW @@ -192,9 +200,15 @@ B = A.xx; \subsection advanced_swizzle_ext Extension implementation - A safer way to do swizzling is to use the extension. This extension provides the GLSL functionality, but uses a different syntax for it. However, the swizzle extension also provides dynamic swizzling. + A safer way to do swizzling is to use the extension. + This extension provides the GLSL functionality, but uses a different syntax for it. + Moreover, the swizzle extension also provides dynamic swizzling. - Static swizzling is resovled at compile-time. The swizzle mask ".xzyy" is as fixed as the type of a particular variable. Dynamic swizzling is resolved at runtime via function calls. Dynamic swizzling is more flexible, since one can choose the swizzle mask at runtime, but it runs slower. This performance issue is enhanced when \ref advanced_simd "SIMD instructions" are used. + Static swizzling is resovled at compile-time. + The swizzle mask ".xzyy" is as fixed as the type of a particular variable. + Dynamic swizzling is resolved at runtime via function calls. + Dynamic swizzling is more flexible, since one can choose the swizzle mask at runtime, but it runs slower. + This performance issue is enhanced when \ref advanced_simd "SIMD instructions" are used. \code #include @@ -239,20 +253,26 @@ void foo() \section advanced_inline Force Inline - GLM's functions are defined in headers, so they are defined with C++'s "inline" delcaration. This does not require the compiler to inline them, however. If you want to force the compiler to inline the function, using whatever capabilities that the compiler provides to do so, you can define GLM_FORCE_INLINE before any inclusion of . + GLM's functions are defined in headers, so they are defined with C++'s "inline" delcaration. + This does not require the compiler to inline them, however. + If you want to force the compiler to inline the function, using whatever capabilities that the compiler provides to do so, + you can define GLM_FORCE_INLINE before any inclusion of . \code #define GLM_FORCE_INLINE #include \endcode - \section advanced_simd SIMD Support + \section advanced_simd SIMD support - GLM provides some SIMD optimizations based on compiler intrinsics. These optimizations will be automatically utilized based on the build environment. These optimizations are mainly available through the extensions \ref gtx_simd_vec4 and \ref gtx_simd_mat4. + GLM provides some SIMD optimizations based on compiler intrinsics. + These optimizations will be automatically utilized based on the build environment. + These optimizations are mainly available through the extensions \ref gtx_simd_vec4 and \ref gtx_simd_mat4. A programmer can restrict or force instruction sets used for these optimizations using GLM_FORCE_SSE2 or GLM_FORCE_AVX. - A programmer can discard the use of intrinsics by defining GLM_FORCE_PURE before any inclusion of . If GLM_FORCE_PURE is defined, then including a SIMD extension will generate a build error. + A programmer can discard the use of intrinsics by defining GLM_FORCE_PURE before any inclusion of . + If GLM_FORCE_PURE is defined, then including a SIMD extension will generate a build error. \code #define GLM_FORCE_PURE @@ -260,7 +280,8 @@ void foo() \endcode \section advanced_compatibility Compatibility - Compilers have some language extensions that GLM will automatically take advantage of them when they are enabled. The #define GLM_FORCE_CXX98 can switch off these extensions, forcing GLM to operate on pure C++98. + Compilers have some language extensions that GLM will automatically take advantage of them when they are enabled. + The #define GLM_FORCE_CXX98 can switch off these extensions, forcing GLM to operate on pure C++98. \code #define GLM_FORCE_CXX98 @@ -269,11 +290,12 @@ void foo() **/ /*! - \page pg_deprecated Deprecated Function Replacements + \page pg_deprecated Deprecated function replacements - The OpenGL 3.0 specification deprecated some features, and most of these have been removed from the OpenGL 3.1 specfication and beyond. GLM provides some replacement functions. Many of these functions come from the \ref gtc_matrix_transform extension. + The OpenGL 3.0 specification deprecated some features, and most of these have been removed from the OpenGL 3.1 specfication and beyond. + GLM provides some replacement functions. Many of these functions come from the \ref gtc_matrix_transform extension. - \section deprecated_opengl OpenGL Function Replacements + \section deprecated_opengl OpenGL function replacements
glRotate[fd]
@@ -298,7 +320,7 @@ void foo()
\link glm::gtc::matrix_transform::lookAt glm::lookAt \endlink
- \section deprecated_glu GLU Function Replacements + \section deprecated_glu GLU function replacements
gluOrtho2D
diff --git a/doc/virtrevModules.doxy b/doc/virtrevModules.doxy index 8eb4e74e..b617cb90 100644 --- a/doc/virtrevModules.doxy +++ b/doc/virtrevModules.doxy @@ -1,11 +1,11 @@ /*! - \defgroup virtrev VIRTREV Extensions (Stable) + \defgroup virtrev VIRTREV Extensions \brief Extensions develop and maintain by Mathieu [matrem] Roumillac (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660). **/ /*! - \defgroup virtrev_xstream xml like output + \defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output \ingroup virtrev \brief Streaming vector and matrix in a xml way. diff --git a/glm/glm.hpp b/glm/glm.hpp index cc448ec5..a587e78c 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -45,7 +45,7 @@ namespace glm bool main_core(); }//namespace test - //! GLM core. Namespace that includes all the feature define by GLSL 1.30.8 specification. This namespace is included in glm namespace. + //! GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace. namespace core { //! Scalar, vectors and matrices @@ -67,9 +67,6 @@ namespace glm //! The interface could change between releases. namespace gtx{} - //! IMG extensions. - namespace img{} - //! VIRTREV extensions. namespace img{} diff --git a/glm/gtx/comparison.inl b/glm/gtx/comparison.inl deleted file mode 100644 index 0c8f8fa5..00000000 --- a/glm/gtx/comparison.inl +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-06-22 -// Updated : 2008-10-27 -// Licence : This source is under MIT License -// File : glm/gtx/comparison.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace gtx{ -namespace comparison{ -/* -template -inline bool operator== -( - detail::tvec2 const & x, - detail::tvec2 const & y -) -{ - return glm::all(glm::equal(x, y)); -} - -template -inline bool operator== -( - detail::tvec3 const & x, - detail::tvec3 const & y -) -{ - return glm::all(glm::equal(x, y)); -} - -template -inline bool operator== -( - detail::tvec4 const & x, - detail::tvec4 const & y -) -{ - return glm::all(glm::equal(x, y)); -} - -template -inline bool operator!= -( - detail::tvec2 const & x, - detail::tvec2 const & y -) -{ - return glm::any(glm::notEqual(x, y)); -} - -template -inline bool operator!= -( - detail::tvec3 const & x, - detail::tvec3 const & y -) -{ - return glm::any(glm::notEqual(x, y)); -} - -template -inline bool operator!= -( - detail::tvec4 const & x, - detail::tvec4 const & y -) -{ - return glm::any(glm::notEqual(x, y)); -} -*/ -}//namespace comparison -}//namespace gtx -}//namespace glm diff --git a/glm/gtx/simd_common.hpp b/glm/gtx/simd_common.hpp deleted file mode 100644 index e69de29b..00000000 diff --git a/glm/gtx/simd_common.inl b/glm/gtx/simd_common.inl deleted file mode 100644 index e69de29b..00000000 diff --git a/glm/gtx/simd_geometric.hpp b/glm/gtx/simd_geometric.hpp deleted file mode 100644 index e69de29b..00000000 diff --git a/glm/gtx/simd_geometric.inl b/glm/gtx/simd_geometric.inl deleted file mode 100644 index e69de29b..00000000