GLI  0.5.1
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:
50 
51  image();
52 
54  explicit image(
55  dimensions_type const & Dimensions,
56  size_type const & BlockSize,
57  dimensions_type const & BlockDimensions);
58 
60  explicit image(
61  format const & Format,
62  dimensions_type const & Dimensions);
63 
65  explicit image(
66  storage const & Storage,
67  size_type BaseLayer, size_type MaxLayer,
68  size_type BaseFace, size_type MaxFace,
69  size_type BaseLevel, size_type MaxLevel);
70 
72  operator storage() const;
73 
74  bool empty() const;
76 
77  size_type size() const;
78  void * data();
79  void const * data() const;
80 
81  template <typename genType>
82  size_type size() const;
83  template <typename genType>
84  genType * data();
85  template <typename genType>
86  genType const * data() const;
87 
88  void clear();
89  template <typename genType>
90  void clear(genType const & Texel);
91  template <typename genType>
92  genType load(dimensions_type const & TexelCoord);
93  template <typename genType>
94  void store(dimensions_type const & TexelCoord, genType const & Data);
95 
96  size_type baseLayer() const;
97  size_type maxLayer() const;
98  size_type baseFace() const;
99  size_type maxFace() const;
100  size_type baseLevel() const;
101  size_type maxLevel() const;
102 
103  private:
104  storage Storage;
105  size_type BaseLayer;
106  size_type MaxLayer;
107  size_type BaseFace;
108  size_type MaxFace;
109  size_type BaseLevel;
110  size_type MaxLevel;
111  };
112 }//namespace gli
113 
114 #include "image.inl"
115 
116 #endif//GLI_CORE_IMAGE_INCLUDED
void store(dimensions_type const &TexelCoord, genType const &Data)
glm::uint dimensions1_type
Definition: storage.hpp:69
glm::uvec2 dimensions2_type
Definition: storage.hpp:70
storage::dimensions1_type dimensions1_type
Definition: image.hpp:45
Image.
Definition: image.hpp:42
storage::dimensions2_type dimensions2_type
Definition: image.hpp:46
storage::size_type size_type
Definition: image.hpp:49
storage::dimensions3_type dimensions_type
Definition: image.hpp:48
storage::dimensions3_type dimensions3_type
Definition: image.hpp:47
OpenGL Image (gli.g-truc.net)
OpenGL Image (gli.g-truc.net)
size_type maxFace() const
std::size_t size_type
Definition: storage.hpp:78
format
Definition: format.hpp:34
OpenGL Image (gli.g-truc.net)
void clear()
size_type maxLevel() const
size_type size() const
dimensions_type dimensions() const
void * data()
size_type baseLevel() const
size_type baseLayer() const
glm::uvec3 dimensions3_type
Definition: storage.hpp:71
size_type baseFace() const
size_type maxLayer() const
genType load(dimensions_type const &TexelCoord)
bool empty() const