GLI  0.6.0
image.hpp
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include "storage.hpp"
35 #include "addressing.hpp"
36 #include "header.hpp"
37 
38 namespace gli
39 {
41  class image
42  {
43  public:
52 
53  image();
54 
56  explicit image(
57  format const & Format,
58  dim_type const & Dimensions);
59 
61  explicit image(
62  storage const & Storage,
63  size_type BaseLayer, size_type MaxLayer,
64  size_type BaseFace, size_type MaxFace,
65  size_type BaseLevel, size_type MaxLevel);
66 
68  operator storage() const;
69 
70  bool empty() const;
71  dim_type dimensions() const;
72 
73  size_type size() const;
74  void * data();
75  void const * data() const;
76 
77  template <typename genType>
78  size_type size() const;
79  template <typename genType>
80  genType * data();
81  template <typename genType>
82  genType const * data() const;
83 
84  void clear();
85  template <typename genType>
86  void clear(genType const & Texel);
87  template <typename genType>
88  genType load(dim_type const & TexelCoord);
89  template <typename genType>
90  void store(dim_type const & TexelCoord, genType const & Data);
91 
92  size_type baseLayer() const;
93  size_type maxLayer() const;
94  size_type baseFace() const;
95  size_type maxFace() const;
96  size_type baseLevel() const;
97  size_type maxLevel() const;
98 
99  private:
100  storage Storage;
101  size_type BaseLayer;
102  size_type MaxLayer;
103  size_type BaseFace;
104  size_type MaxFace;
105  size_type BaseLevel;
106  size_type MaxLevel;
107  };
108 }//namespace gli
109 
110 #include "image.inl"
size_t size_type
Definition: storage.hpp:68
size_type maxLayer() const
storage::size_type face_type
Definition: image.hpp:51
void store(dim_type const &TexelCoord, genType const &Data)
storage::size_type layer_type
Definition: image.hpp:49
storage::size_type size_type
Definition: image.hpp:48
size_type maxLevel() const
OpenGL Image (gli.g-truc.net)
storage::dim3_type dim3_type
Definition: image.hpp:46
storage::dim1_type dim1_type
Definition: image.hpp:44
storage::dim2_type dim2_type
Definition: image.hpp:45
void * data()
storage::dim3_type dim_type
Definition: image.hpp:47
Image.
Definition: image.hpp:41
OpenGL Image (gli.g-truc.net)
size_type baseLevel() const
size_type maxFace() const
OpenGL Image (gli.g-truc.net)
size_type baseFace() const
dim_type dimensions() const
void clear()
storage::size_type level_type
Definition: image.hpp:50
bool empty() const
size_type size() const
dim2_t dim2_type
Definition: storage.hpp:60
genType load(dim_type const &TexelCoord)
dim1_t dim1_type
Definition: storage.hpp:59
dim3_t dim3_type
Definition: storage.hpp:61
format
Definition: format.hpp:33
size_type baseLayer() const