0.9.8 API documenation
precision.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "setup.hpp"
7 
8 namespace glm
9 {
10  enum precision
11  {
12  packed_highp,
13  packed_mediump,
14  packed_lowp,
15 
16 # if GLM_HAS_ALIGNED_TYPE
17  aligned_highp,
18  aligned_mediump,
19  aligned_lowp,
20  aligned = aligned_highp,
21 # endif
22 
23  highp = packed_highp,
24  mediump = packed_mediump,
25  lowp = packed_lowp,
26  packed = packed_highp,
27 
28 # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED)
29  defaultp = aligned_highp
30 # else
31  defaultp = highp
32 # endif
33  };
34 
35 namespace detail
36 {
37  template <glm::precision P>
38  struct is_aligned
39  {
40  static const bool value = false;
41  };
42 
43 # if GLM_HAS_ALIGNED_TYPE
44  template<>
45  struct is_aligned<glm::aligned_lowp>
46  {
47  static const bool value = true;
48  };
49 
50  template<>
51  struct is_aligned<glm::aligned_mediump>
52  {
53  static const bool value = true;
54  };
55 
56  template<>
57  struct is_aligned<glm::aligned_highp>
58  {
59  static const bool value = true;
60  };
61 # endif
62 }//namespace detail
63 }//namespace glm
GLM Core
Definition: _noise.hpp:11