FlukyEngine
|
Experimental extensions More...
#include "../detail/setup.hpp"
#include "../vec2.hpp"
#include "../vec3.hpp"
#include "../vec4.hpp"
#include "../mat2x2.hpp"
#include <type_traits>
Go to the source code of this file.
Namespaces | |
glm | |
Core features | |
Macros | |
#define | GLM_IMPLEMENT_SCAL_MULT(Vec) |
Typedefs | |
template<typename T , typename Vec > | |
using | glm::return_type_scalar_multiplication = typename std::enable_if< !std::is_same< T, float >::value &&std::is_arithmetic< T >::value, Vec >::type |
Include <glm/gtx/scalar_multiplication.hpp> to use the features of this extension.
Enables scalar multiplication for all types
Since GLSL is very strict about types, the following (often used) combinations do not work: double * vec4 int * vec4 vec4 / int So we'll fix that! Of course "float * vec4" should remain the same (hence the enable_if magic)
#define GLM_IMPLEMENT_SCAL_MULT | ( | Vec | ) |