0.8.0 API documentation
target.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 namespace gli
7 {
9  enum target
10  {
11  TARGET_1D = 0, TARGET_FIRST = TARGET_1D,
12  TARGET_1D_ARRAY,
13  TARGET_2D,
14  TARGET_2D_ARRAY,
15  TARGET_3D,
16  TARGET_RECT,
17  TARGET_RECT_ARRAY,
18  TARGET_CUBE,
19  TARGET_CUBE_ARRAY, TARGET_LAST = TARGET_CUBE_ARRAY
20  };
21 
22  enum
23  {
24  TARGET_COUNT = TARGET_LAST - TARGET_FIRST + 1,
25  TARGET_INVALID = -1
26  };
27 
29  inline bool is_target_1d(target Target)
30  {
31  return Target == TARGET_1D || Target == TARGET_1D_ARRAY;
32  }
33 
35  inline bool is_target_array(target Target)
36  {
37  return Target == TARGET_1D_ARRAY || Target == TARGET_2D_ARRAY || Target == TARGET_CUBE_ARRAY;
38  }
39 
41  inline bool is_target_cube(target Target)
42  {
43  return Target == TARGET_CUBE || Target == TARGET_CUBE_ARRAY;
44  }
45 
47  inline bool is_target_rect(target Target)
48  {
49  return Target == TARGET_RECT || Target == TARGET_RECT_ARRAY;
50  }
51 }//namespace gli
bool is_target_array(target Target)
Check whether a target is an array target.
Definition: target.hpp:35
Namespace where all the classes and functions provided by GLI are exposed.
Definition: comparison.hpp:15
target
Texture target: type/shape of the texture storage.
Definition: target.hpp:9
bool is_target_rect(target Target)
Check whether a target is a rectangle target.
Definition: target.hpp:47
bool is_target_cube(target Target)
Check whether a target is a cube map target.
Definition: target.hpp:41
bool is_target_1d(target Target)
Check whether a target is a 1D target.
Definition: target.hpp:29