0.6.1
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:
44  typedef dim3_t dim_type;
45  typedef size_t size_type;
46 
47  image();
48 
50  explicit image(
51  format const & Format,
52  dim_type const & Dimensions);
53 
55  explicit image(
56  storage const & Storage,
57  size_type BaseLayer, size_type MaxLayer,
58  size_type BaseFace, size_type MaxFace,
59  size_type BaseLevel, size_type MaxLevel);
60 
62  operator storage() const;
63 
64  bool empty() const;
65  dim_type dimensions() const;
66 
67  size_type size() const;
68  void * data();
69  void const * data() const;
70 
71  template <typename genType>
72  size_type size() const;
73  template <typename genType>
74  genType * data();
75  template <typename genType>
76  genType const * data() const;
77 
78  void clear();
79  template <typename genType>
80  void clear(genType const & Texel);
81  template <typename genType>
82  genType load(dim_type const & TexelCoord);
83  template <typename genType>
84  void store(dim_type const & TexelCoord, genType const & Data);
85 
86  size_type baseLayer() const;
87  size_type maxLayer() const;
88  size_type baseFace() const;
89  size_type maxFace() const;
90  size_type baseLevel() const;
91  size_type maxLevel() const;
92 
93  private:
94  storage Storage;
95  size_type BaseLayer;
96  size_type MaxLayer;
97  size_type BaseFace;
98  size_type MaxFace;
99  size_type BaseLevel;
100  size_type MaxLevel;
101  };
102 }//namespace gli
103 
104 #include "image.inl"
OpenGL Image (gli.g-truc.net)
size_type maxLayer() const
void store(dim_type const &TexelCoord, genType const &Data)
format
Definition: format.hpp:33
size_type maxLevel() const
OpenGL Image (gli.g-truc.net)
void * data()
OpenGL Image (gli.g-truc.net)
Image.
Definition: image.hpp:41
size_type baseLevel() const
glm::tvec3< size_t > dim3_t
Definition: type.hpp:49
size_type maxFace() const
size_type baseFace() const
dim_type dimensions() const
void clear()
bool empty() const
size_type size() const
size_t size_type
Definition: image.hpp:45
dim3_t dim_type
Definition: image.hpp:44
genType load(dim_type const &TexelCoord)
size_type baseLayer() const