GLI  0.5.0
image.hpp
Go to the documentation of this file.
1 
32 #ifndef GLI_CORE_IMAGE_INCLUDED
33 #define GLI_CORE_IMAGE_INCLUDED
34 
35 #include "storage.hpp"
36 #include "addressing.hpp"
37 #include "header.hpp"
38 
39 namespace gli
40 {
42  class image
43  {
44  public:
47 
48  image();
49 
51  explicit image(
52  dimensions_type const & Dimensions,
53  size_type const & BlockSize,
54  dimensions_type const & BlockDimensions);
55 
57  explicit image(
58  format const & Format,
59  dimensions_type const & Dimensions);
60 
62  explicit image(
63  storage const & Storage,
64  size_type BaseLayer, size_type MaxLayer,
65  size_type BaseFace, size_type MaxFace,
66  size_type BaseLevel, size_type MaxLevel);
67 
69  operator storage() const;
70 
71  bool empty() const;
73 
74  size_type size() const;
75  void * data();
76  void const * data() const;
77 
78  template <typename genType>
79  size_type size() const;
80  template <typename genType>
81  genType * data();
82  template <typename genType>
83  genType const * data() const;
84 
85  void clear();
86  template <typename genType>
87  void clear(genType const & Texel);
88 
89  size_type baseLayer() const;
90  size_type maxLayer() const;
91  size_type baseFace() const;
92  size_type maxFace() const;
93  size_type baseLevel() const;
94  size_type maxLevel() const;
95 
96  private:
97  storage Storage;
98  size_type BaseLayer;
99  size_type MaxLayer;
100  size_type BaseFace;
101  size_type MaxFace;
102  size_type BaseLevel;
103  size_type MaxLevel;
104  };
105 }//namespace gli
106 
107 #include "image.inl"
108 
109 #endif//GLI_CORE_IMAGE_INCLUDED
Image.
Definition: image.hpp:42
storage::size_type size_type
Definition: image.hpp:46
storage::dimensions3_type dimensions_type
Definition: image.hpp:45
OpenGL Image (gli.g-truc.net)
size_type maxFace() const
std::size_t size_type
Definition: storage.hpp:68
void clear()
size_type maxLevel() const
size_type size() const
dimensions_type dimensions() const
OpenGL Image (gli.g-truc.net)
void * data()
size_type baseLevel() const
OpenGL Image (gli.g-truc.net)
size_type baseLayer() const
glm::uvec3 dimensions3_type
Definition: storage.hpp:61
size_type baseFace() const
size_type maxLayer() const
bool empty() const
format
Definition: format.hpp:34