GLI  0.5.0
texture1d.hpp
Go to the documentation of this file.
1 
29 #ifndef GLI_CORE_TEXTURE1D_INCLUDED
30 #define GLI_CORE_TEXTURE1D_INCLUDED
31 
32 #include "image.hpp"
33 
34 namespace gli
35 {
36  class texture1DArray;
37 
38  class texture1D
39  {
40  public:
45 
46  public:
47  texture1D();
48 
50  explicit texture1D(
51  size_type const & Levels,
52  format_type const & Format,
53  dimensions_type const & Dimensions);
54 
56  explicit texture1D(
57  format_type const & Format,
58  dimensions_type const & Dimensions);
59 
61  explicit texture1D(
62  storage const & Storage);
63 
65  explicit texture1D(
66  storage const & Storage,
67  format_type const & Format,
68  size_type BaseLayer,
69  size_type MaxLayer,
70  size_type BaseFace,
71  size_type MaxFace,
72  size_type BaseLevel,
73  size_type MaxLevel);
74 
76  explicit texture1D(
77  texture1D const & Texture,
78  size_type const & BaseLevel,
79  size_type const & MaxLevel);
80 
82  explicit texture1D(
83  texture1DArray const & Texture,
84  size_type const & BaseLayer,
85  size_type const & BaseLevel,
86  size_type const & MaxLevel);
87 
88  operator storage() const;
89  image operator[] (size_type const & Level) const;
90 
91  bool empty() const;
92  format_type format() const;
94  size_type layers() const;
95  size_type faces() const;
96  size_type levels() const;
97 
98  size_type size() const;
99  void * data();
100  void const * data() const;
101 
102  template <typename genType>
103  size_type size() const;
104  template <typename genType>
105  genType * data();
106  template <typename genType>
107  genType const * data() const;
108 
109  void clear();
110  template <typename genType>
111  void clear(genType const & Texel);
112 
113  size_type baseLayer() const;
114  size_type maxLayer() const;
115  size_type baseFace() const;
116  size_type maxFace() const;
117  size_type baseLevel() const;
118  size_type maxLevel() const;
119 
120  private:
121  storage Storage;
122  size_type BaseLayer;
123  size_type MaxLayer;
124  size_type BaseFace;
125  size_type MaxFace;
126  size_type BaseLevel;
127  size_type MaxLevel;
128  format_type Format;
129  };
130 }//namespace gli
131 
132 #endif//GLI_CORE_TEXTURE1D_INCLUDED
size_type levels() const
float texcoord1_type
Definition: storage.hpp:64
storage::dimensions1_type dimensions_type
Definition: texture1d.hpp:41
size_type layers() const
size_type maxFace() const
glm::uint dimensions1_type
Definition: storage.hpp:59
size_type baseLevel() const
Image.
Definition: image.hpp:42
size_type baseLayer() const
size_type maxLevel() const
size_type size() const
dimensions_type dimensions() const
image operator[](size_type const &Level) const
format_type format() const
OpenGL Image (gli.g-truc.net)
std::size_t size_type
Definition: storage.hpp:68
storage::format_type format_type
Definition: texture1d.hpp:44
size_type baseFace() const
storage::size_type size_type
Definition: texture1d.hpp:43
size_type maxLayer() const
bool empty() const
storage::texcoord1_type texcoord_type
Definition: texture1d.hpp:42
size_type faces() const
format
Definition: format.hpp:34