GLI  0.6.0
texture_cube.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "image.hpp"
32 
33 namespace gli
34 {
35  class texture2D;
36  class textureCubeArray;
37 
39  {
40  public:
48 
49  public:
50  textureCube();
51 
53  explicit textureCube(
54  size_type const & Faces,
55  size_type const & Levels,
56  format_type const & Format,
57  dim_type const & Dimensions);
58 
60  explicit textureCube(
61  size_type const & Faces,
62  format_type const & Format,
63  dim_type const & Dimensions);
64 
66  explicit textureCube(
67  storage const & Storage);
68 
70  explicit textureCube(
71  storage const & Storage,
72  format_type const & Format,
73  size_type BaseLayer,
74  size_type MaxLayer,
75  size_type BaseFace,
76  size_type MaxFace,
77  size_type BaseLevel,
78  size_type MaxLevel);
79 
81  explicit textureCube(
82  textureCube const & Texture,
83  size_type const & BaseFace,
84  size_type const & MaxFace,
85  size_type const & BaseLevel,
86  size_type const & MaxLevel);
87 
89  explicit textureCube(
90  textureCubeArray const & Texture,
91  size_type const & BaseLayer,
92  size_type const & BaseFace,
93  size_type const & MaxFace,
94  size_type const & BaseLevel,
95  size_type const & MaxLevel);
96 
98  explicit textureCube(
99  texture2D const & Texture,
100  size_type const & BaseLevel,
101  size_type const & MaxLevel);
102 
103  operator storage() const;
104  texture2D operator[] (size_type const & Face) const;
105 
106  bool empty() const;
107  format_type format() const;
108  dim_type dimensions() const;
109  size_type layers() const;
110  size_type faces() const;
111  size_type levels() const;
112 
113  size_type size() const;
114  void * data();
115  void const * data() const;
116 
117  template <typename genType>
118  size_type size() const;
119  template <typename genType>
120  genType * data();
121  template <typename genType>
122  genType const * data() const;
123 
124  void clear();
125  template <typename genType>
126  void clear(genType const & Texel);
127 
128  size_type baseLayer() const;
129  size_type maxLayer() const;
130  size_type baseFace() const;
131  size_type maxFace() const;
132  size_type baseLevel() const;
133  size_type maxLevel() const;
134 
135  private:
136  storage Storage;
137  size_type BaseLayer;
138  size_type MaxLayer;
139  size_type BaseFace;
140  size_type MaxFace;
141  size_type BaseLevel;
142  size_type MaxLevel;
143  format_type Format;
144  };
145 }//namespace gli
size_type baseLayer() const
size_t size_type
Definition: storage.hpp:68
size_type levels() const
storage::texcoord3_type texcoord_type
storage::size_type face_type
texture2D operator[](size_type const &Face) const
bool empty() const
storage::size_type level_type
storage::size_type size_type
texture2D
Definition: texture2d.hpp:40
storage::size_type layer_type
dim_type dimensions() const
OpenGL Image (gli.g-truc.net)
storage::format_type format_type
format_type format() const
size_type baseFace() const
size_type baseLevel() const
size_type maxFace() const
size_type size() const
size_type layers() const
size_type maxLevel() const
size_type faces() const
texcoord3_t texcoord3_type
Definition: storage.hpp:66
dim2_t dim2_type
Definition: storage.hpp:60
storage::dim2_type dim_type
size_type maxLayer() const
format
Definition: format.hpp:33