| 0.8.1 API documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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
gli::is_target_array
bool is_target_array(target Target)
Check whether a target is an array target.
Definition: target.hpp:35
gli::target
target
Texture target: type/shape of the texture storage_linear.
Definition: target.hpp:9
gli
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
gli::is_target_cube
bool is_target_cube(target Target)
Check whether a target is a cube map target.
Definition: target.hpp:41
gli::is_target_rect
bool is_target_rect(target Target)
Check whether a target is a rectangle target.
Definition: target.hpp:47
gli::is_target_1d
bool is_target_1d(target Target)
Check whether a target is a 1D target.
Definition: target.hpp:29