Updated message system

This commit is contained in:
Christophe Riccio 2011-01-19 12:27:30 +00:00
parent 14b7c7337b
commit fbd1c49fbc
2 changed files with 27 additions and 21 deletions

View File

@ -2,7 +2,7 @@
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) // OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2005-01-14 // Created : 2005-01-14
// Updated : 2010-05-30 // Updated : 2011-01-19
// Licence : This source is under MIT License // Licence : This source is under MIT License
// File : glm/glm.hpp // File : glm/glm.hpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
@ -30,14 +30,17 @@
#ifndef glm_glm #ifndef glm_glm
#define glm_glm #define glm_glm
//! Workaround for compatibility with other libraries
#ifdef max #ifdef max
#undef max #undef max
#endif #endif
//! Workaround for compatibility with other libraries
#ifdef min #ifdef min
#undef min #undef min
#endif #endif
//! TODO: to delete
#define GLMvalType typename genType::value_type #define GLMvalType typename genType::value_type
#define GLMcolType typename genType::col_type #define GLMcolType typename genType::col_type
#define GLMrowType typename genType::row_type #define GLMrowType typename genType::row_type
@ -48,6 +51,13 @@
#include <limits> #include <limits>
#include "./setup.hpp" #include "./setup.hpp"
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE == GLM_ENABLE))
# ifndef GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
# pragma message("GLM: Core library included")
# endif//GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
#endif//GLM_MESSAGE
//! GLM namespace, it contains all GLSL based features. //! GLM namespace, it contains all GLSL based features.
namespace glm namespace glm
{ {
@ -101,10 +111,6 @@ namespace glm
#include "./core/func_noise.hpp" #include "./core/func_noise.hpp"
#include "./core/_swizzle.hpp" #include "./core/_swizzle.hpp"
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_CORE | GLM_MESSAGE_NOTIFICATION)))
# pragma message("GLM message: Core library included")
#endif//GLM_MESSAGE
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC)) #if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
# define GLM_DEPRECATED __declspec(deprecated) # define GLM_DEPRECATED __declspec(deprecated)
# define GLM_RESTRICT __restrict # define GLM_RESTRICT __restrict

View File

@ -28,18 +28,18 @@
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Message // Message
#define GLM_MESSAGE_QUIET 0x00000000 //#define GLM_MESSAGE_QUIET 0x00000000
//
#define GLM_MESSAGE_WARNING 0x00000001 //#define GLM_MESSAGE_WARNING 0x00000001
#define GLM_MESSAGE_NOTIFICATION 0x00000002 //#define GLM_MESSAGE_NOTIFICATION 0x00000002
#define GLM_MESSAGE_CORE 0x00000004 //#define GLM_MESSAGE_CORE 0x00000004
#define GLM_MESSAGE_EXTS 0x00000008 //#define GLM_MESSAGE_EXTS 0x00000008
#define GLM_MESSAGE_SETUP 0x00000010 //#define GLM_MESSAGE_SETUP 0x00000010
//
#define GLM_MESSAGE_ALL GLM_MESSAGE_WARNING | GLM_MESSAGE_NOTIFICATION | GLM_MESSAGE_CORE | GLM_MESSAGE_EXTS | GLM_MESSAGE_SETUP //#define GLM_MESSAGE_ALL GLM_MESSAGE_WARNING | GLM_MESSAGE_NOTIFICATION | GLM_MESSAGE_CORE | GLM_MESSAGE_EXTS | GLM_MESSAGE_SETUP
//! By default: //! By default:
// #define GLM_MESSAGE GLM_MESSAGE_QUIET // #define GLM_MESSAGE GLM_DISABLE
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Precision // Precision
@ -204,15 +204,15 @@
///////////////// /////////////////
// C++ Version // // C++ Version //
#define GLM_CPP98 1 #define GLM_LANG_CPP98 1
#define GLM_CPP0X 2 #define GLM_LANG_CPP0X 2
#if((GLM_COMPILER & GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x #if((GLM_COMPILER & GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
# define GLM_CPP GLM_CPP0X # define GLM_LANG GLM_LANG_CPP0X
#elif GLM_COMPILER & GLM_COMPILER_VC2010 #elif GLM_COMPILER & GLM_COMPILER_VC2010
# define GLM_CPP GLM_CPP0X # define GLM_LANG GLM_LANG_CPP0X
#else #else
# define GLM_CPP GLM_CPP98 # define GLM_LANG GLM_LANG_CPP98
#endif #endif
///////////// /////////////
@ -393,7 +393,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Static assert // Static assert
#if(GLM_CPP == GLM_CPP0X) #if(GLM_LANG == GLM_LANG_CPP0X)
# define GLM_STATIC_ASSERT(x, message) static_assert(x, message) # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
#elif(defined(BOOST_STATIC_ASSERT)) #elif(defined(BOOST_STATIC_ASSERT))
# define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x) # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)