0.7.0
target.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 namespace gli
32 {
33  enum target
34  {
35  TARGET_1D = 0, TARGET_FIRST = TARGET_1D,
36  TARGET_1D_ARRAY,
37  TARGET_2D,
38  TARGET_2D_ARRAY,
39  TARGET_3D,
40  TARGET_CUBE,
41  TARGET_CUBE_ARRAY, TARGET_LAST = TARGET_CUBE_ARRAY
42  };
43 
44  enum
45  {
46  TARGET_COUNT = TARGET_LAST - TARGET_FIRST + 1,
47  TARGET_INVALID = -1
48  };
49 
51  inline bool is_target_1d(target Target)
52  {
53  return Target == TARGET_1D || Target == TARGET_1D_ARRAY;
54  }
55 
57  inline bool is_target_array(target Target)
58  {
59  return Target == TARGET_1D_ARRAY || Target == TARGET_2D_ARRAY || Target == TARGET_CUBE_ARRAY;
60  }
61 
63  inline bool is_target_cube(target Target)
64  {
65  return Target == TARGET_CUBE || Target == TARGET_CUBE_ARRAY;
66  }
67 }//namespace gli