mirror of
https://github.com/g-truc/glm.git
synced 2024-11-30 03:44:38 +00:00
- Added error for including of different versions of GLM #619 - Added GLM_FORCE_IGNORE_VERSION to ignore error caused by including different version of GLM #619
This commit is contained in:
parent
83602bdea4
commit
a9a832e187
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/common.hpp
|
/// @file glm/common.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_common.hpp"
|
#include "detail/func_common.hpp"
|
||||||
|
@ -20,7 +20,7 @@ namespace detail
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
template<length_t L, typename T, precision P, template<int, class, precision> class vecType, bool isFloat, bool Aligned>
|
template<length_t L, typename T, precision P, template<length_t, class, precision> class vecType, bool isFloat, bool Aligned>
|
||||||
struct compute_log2
|
struct compute_log2
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v)
|
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v)
|
||||||
|
@ -111,7 +111,7 @@ namespace detail
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||||
template<int DA, int DB, typename T, precision P, template<length_t, typename, precision> class vecTypeA, template<length_t, typename, precision> class vecTypeB>
|
template<length_t DA, length_t DB, typename T, precision P, template<length_t, typename, precision> class vecTypeA, template<length_t, typename, precision> class vecTypeB>
|
||||||
GLM_FUNC_DECL typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<DA, T, P> const & c, vecTypeB<DB, T, P> const & r);
|
GLM_FUNC_DECL typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<DA, T, P> const & c, vecTypeB<DB, T, P> const & r);
|
||||||
|
|
||||||
/// Returns the transposed matrix of x
|
/// Returns the transposed matrix of x
|
||||||
|
@ -362,7 +362,7 @@ namespace detail
|
|||||||
return detail::compute_matrixCompMult<matType, C, R, T, P, detail::is_aligned<P>::value>::call(x, y);
|
return detail::compute_matrixCompMult<matType, C, R, T, P, detail::is_aligned<P>::value>::call(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<int DA, int DB, typename T, precision P, template<length_t, typename, precision> class vecTypeA, template<length_t, typename, precision> class vecTypeB>
|
template<length_t DA, length_t DB, typename T, precision P, template<length_t, typename, precision> class vecTypeA, template<length_t, typename, precision> class vecTypeB>
|
||||||
GLM_FUNC_QUALIFIER typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<DA, T, P> const & c, vecTypeB<DB, T, P> const & r)
|
GLM_FUNC_QUALIFIER typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<DA, T, P> const & c, vecTypeB<DB, T, P> const & r)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs");
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/detail/setup.hpp
|
/// @file glm/detail/setup.hpp
|
||||||
|
|
||||||
#pragma once
|
#ifndef GLM_SETUP_INCLUDED
|
||||||
|
|
||||||
|
#define GLM_VERSION_MAJOR 0
|
||||||
|
#define GLM_VERSION_MINOR 9
|
||||||
|
#define GLM_VERSION_PATCH 9
|
||||||
|
#define GLM_VERSION_REVISION 0
|
||||||
|
#define GLM_VERSION 990
|
||||||
|
|
||||||
|
#define GLM_SETUP_INCLUDED GLM_VERSION
|
||||||
|
|
||||||
#if defined(GLM_FORCE_SWIZZLE) && defined(GLM_FORCE_UNRESTRICTED_GENTYPE)
|
#if defined(GLM_FORCE_SWIZZLE) && defined(GLM_FORCE_UNRESTRICTED_GENTYPE)
|
||||||
# error "Both GLM_FORCE_SWIZZLE and GLM_FORCE_UNRESTRICTED_GENTYPE can't be defined at the same time"
|
# error "Both GLM_FORCE_SWIZZLE and GLM_FORCE_UNRESTRICTED_GENTYPE can't be defined at the same time"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Messages
|
// Messages
|
||||||
|
|
||||||
@ -19,19 +30,14 @@
|
|||||||
# define GLM_MESSAGES GLM_MESSAGES_DISABLE
|
# define GLM_MESSAGES GLM_MESSAGES_DISABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cassert>
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
#include <cstddef>
|
// Detect the platform
|
||||||
|
|
||||||
#include "../simd/platform.h"
|
#include "../simd/platform.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Version
|
// Version
|
||||||
|
|
||||||
#define GLM_VERSION 99
|
|
||||||
#define GLM_VERSION_MAJOR 0
|
|
||||||
#define GLM_VERSION_MINOR 9
|
|
||||||
#define GLM_VERSION_PATCH 9
|
|
||||||
#define GLM_VERSION_REVISION 0
|
|
||||||
|
|
||||||
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_VERSION_DISPLAYED)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_VERSION_DISPLAYED)
|
||||||
# define GLM_MESSAGE_VERSION_DISPLAYED
|
# define GLM_MESSAGE_VERSION_DISPLAYED
|
||||||
# pragma message ("GLM: version 0.9.9.0")
|
# pragma message ("GLM: version 0.9.9.0")
|
||||||
@ -731,9 +737,11 @@
|
|||||||
#define GLM_HAS_ALIGNED_TYPE GLM_HAS_UNRESTRICTED_UNIONS
|
#define GLM_HAS_ALIGNED_TYPE GLM_HAS_UNRESTRICTED_UNIONS
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Length type
|
// Length type: all length functions returns a length_t type.
|
||||||
|
// When GLM_FORCE_SIZE_T_LENGTH is defined, length_t is a typedef of size_t otherwise
|
||||||
|
// length_t is a typedef of int like GLSL defines it.
|
||||||
|
|
||||||
// User defines: GLM_FORCE_SIZE_T_LENGTH GLM_FORCE_SIZE_FUNC
|
// User define: GLM_FORCE_SIZE_T_LENGTH
|
||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
@ -784,3 +792,12 @@ namespace glm
|
|||||||
{
|
{
|
||||||
enum ctor{uninitialize};
|
enum ctor{uninitialize};
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Check inclusions of different versions of GLM
|
||||||
|
|
||||||
|
#elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION))
|
||||||
|
# error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error."
|
||||||
|
#elif GLM_SETUP_INCLUDED == GLM_VERSION
|
||||||
|
|
||||||
|
#endif//GLM_SETUP_INCLUDED
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template<int Columns, int Rows, typename T, precision P, template<int, class, precision> class colType, template<int, class, precision> class rowType>
|
template<length_t Columns, length_t Rows, typename T, precision P, template<length_t, class, precision> class colType, template<length_t, class, precision> class rowType>
|
||||||
struct outerProduct_trait{};
|
struct outerProduct_trait{};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/exponential.hpp
|
/// @file glm/exponential.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_exponential.hpp"
|
#include "detail/func_exponential.hpp"
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be
|
/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be
|
||||||
/// included a specific file.
|
/// included a specific file.
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "glm.hpp"
|
#include "glm.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/fwd.hpp
|
/// @file glm/fwd.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_int.hpp"
|
#include "detail/type_int.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/geometric.hpp
|
/// @file glm/geometric.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_geometric.hpp"
|
#include "detail/func_geometric.hpp"
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
|
|
||||||
#include "detail/_fixes.hpp"
|
#include "detail/_fixes.hpp"
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -11,10 +11,11 @@
|
|||||||
///
|
///
|
||||||
/// <glm/gtc/bitfield.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/bitfield.hpp> need to be included to use these functionalities.
|
||||||
|
|
||||||
|
#include "../detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
#include "../detail/setup.hpp"
|
|
||||||
#include "../detail/precision.hpp"
|
#include "../detail/precision.hpp"
|
||||||
#include "../detail/type_int.hpp"
|
#include "../detail/type_int.hpp"
|
||||||
#include "../detail/_vectorize.hpp"
|
#include "../detail/_vectorize.hpp"
|
||||||
|
@ -32,10 +32,10 @@ namespace glm
|
|||||||
/// @param Max
|
/// @param Max
|
||||||
/// @tparam genType Value type. Currently supported: float or double scalars.
|
/// @tparam genType Value type. Currently supported: float or double scalars.
|
||||||
/// @see gtc_random
|
/// @see gtc_random
|
||||||
template<typename genTYpe>
|
template<typename genType>
|
||||||
GLM_FUNC_DECL genTYpe linearRand(
|
GLM_FUNC_DECL genType linearRand(
|
||||||
genTYpe Min,
|
genType Min,
|
||||||
genTYpe Max);
|
genType Max);
|
||||||
|
|
||||||
/// Generate random numbers in the interval [Min, Max], according a linear distribution
|
/// Generate random numbers in the interval [Min, Max], according a linear distribution
|
||||||
///
|
///
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template<length_t L, typename T, precision P, template<int, class, precision> class vecType>
|
template<length_t L, typename T, precision P, template<length_t, class, precision> class vecType>
|
||||||
struct compute_rand
|
struct compute_rand
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static vecType<L, T, P> call();
|
GLM_FUNC_QUALIFIER static vecType<L, T, P> call();
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/integer.hpp
|
/// @file glm/integer.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_integer.hpp"
|
#include "detail/func_integer.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat2x2.hpp
|
/// @file glm/mat2x2.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat2x2.hpp"
|
#include "detail/type_mat2x2.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat2x3.hpp
|
/// @file glm/mat2x3.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat2x3.hpp"
|
#include "detail/type_mat2x3.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat2x4.hpp
|
/// @file glm/mat2x4.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat2x4.hpp"
|
#include "detail/type_mat2x4.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat3x2.hpp
|
/// @file glm/mat3x2.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat3x2.hpp"
|
#include "detail/type_mat3x2.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat3x3.hpp
|
/// @file glm/mat3x3.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat3x3.hpp"
|
#include "detail/type_mat3x3.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat3x4.hpp
|
/// @file glm/mat3x4.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat3x4.hpp"
|
#include "detail/type_mat3x4.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat4x2.hpp
|
/// @file glm/mat4x2.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat4x2.hpp"
|
#include "detail/type_mat4x2.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat4x3.hpp
|
/// @file glm/mat4x3.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat4x3.hpp"
|
#include "detail/type_mat4x3.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/mat4x4.hpp
|
/// @file glm/mat4x4.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_mat4x4.hpp"
|
#include "detail/type_mat4x4.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/matrix.hpp
|
/// @file glm/matrix.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_matrix.hpp"
|
#include "detail/func_matrix.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/packing.hpp
|
/// @file glm/packing.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_packing.hpp"
|
#include "detail/func_packing.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/trigonometric.hpp
|
/// @file glm/trigonometric.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_trigonometric.hpp"
|
#include "detail/func_trigonometric.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/vec2.hpp
|
/// @file glm/vec2.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_vec2.hpp"
|
#include "detail/type_vec2.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/vec3.hpp
|
/// @file glm/vec3.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_vec3.hpp"
|
#include "detail/type_vec3.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/vec4.hpp
|
/// @file glm/vec4.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/type_vec4.hpp"
|
#include "detail/type_vec4.hpp"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/vector_relational.hpp
|
/// @file glm/vector_relational.hpp
|
||||||
|
|
||||||
|
#include "detail/setup.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/func_vector_relational.hpp"
|
#include "detail/func_vector_relational.hpp"
|
||||||
|
@ -69,6 +69,8 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Optimized GTX_matrix_interpolation axisAngle function
|
- Optimized GTX_matrix_interpolation axisAngle function
|
||||||
- Added FAQ 12: Windows headers cause build errors... #557
|
- Added FAQ 12: Windows headers cause build errors... #557
|
||||||
- Removed GCC shadow warnings #595
|
- Removed GCC shadow warnings #595
|
||||||
|
- Added error for including of different versions of GLM #619
|
||||||
|
- Added GLM_FORCE_IGNORE_VERSION to ignore error caused by including different version of GLM #619
|
||||||
|
|
||||||
#### Fixes:
|
#### Fixes:
|
||||||
- Removed doxygen references to GTC_half_float which was removed in 0.9.4
|
- Removed doxygen references to GTC_half_float which was removed in 0.9.4
|
||||||
|
Loading…
Reference in New Issue
Block a user