GLI  0.6.0
texture1d.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "image.hpp"
32 
33 namespace gli
34 {
35  class texture1DArray;
36 
37  class texture1D
38  {
39  public:
47 
48  public:
49  texture1D();
50 
52  explicit texture1D(
53  size_type const & Levels,
54  format_type const & Format,
55  dim_type const & Dimensions);
56 
58  explicit texture1D(
59  format_type const & Format,
60  dim_type const & Dimensions);
61 
63  explicit texture1D(
64  storage const & Storage);
65 
67  explicit texture1D(
68  storage const & Storage,
69  format_type const & Format,
70  size_type BaseLayer,
71  size_type MaxLayer,
72  size_type BaseFace,
73  size_type MaxFace,
74  size_type BaseLevel,
75  size_type MaxLevel);
76 
78  explicit texture1D(
79  texture1D const & Texture,
80  size_type const & BaseLevel,
81  size_type const & MaxLevel);
82 
84  explicit texture1D(
85  texture1DArray const & Texture,
86  size_type const & BaseLayer,
87  size_type const & BaseLevel,
88  size_type const & MaxLevel);
89 
90  operator storage() const;
91  image operator[] (size_type const & Level) const;
92 
93  bool empty() const;
94  format_type format() const;
95  dim_type dimensions() const;
96  size_type layers() const;
97  size_type faces() const;
98  size_type levels() const;
99 
100  size_type size() const;
101  void * data();
102  void const * data() const;
103 
104  template <typename genType>
105  size_type size() const;
106  template <typename genType>
107  genType * data();
108  template <typename genType>
109  genType const * data() const;
110 
111  void clear();
112  template <typename genType>
113  void clear(genType const & Texel);
114 
115  size_type base_layer() const;
116  size_type max_layer() const;
117  size_type base_face() const;
118  size_type max_face() const;
119  size_type base_level() const;
120  size_type max_level() const;
121 
122  private:
123  storage Storage;
124  size_type BaseLayer;
125  size_type MaxLayer;
126  size_type BaseFace;
127  size_type MaxFace;
128  size_type BaseLevel;
129  size_type MaxLevel;
130  format_type Format;
131  };
132 }//namespace gli
size_type levels() const
size_type base_level() const
storage::size_type layer_type
Definition: texture1d.hpp:44
size_t size_type
Definition: storage.hpp:68
size_type layers() const
storage::size_type level_type
Definition: texture1d.hpp:45
texcoord1_t texcoord1_type
Definition: storage.hpp:64
size_type size() const
storage::size_type face_type
Definition: texture1d.hpp:46
image operator[](size_type const &Level) const
size_type base_layer() const
storage::dim1_type dim_type
Definition: texture1d.hpp:40
size_type base_face() const
format_type format() const
OpenGL Image (gli.g-truc.net)
storage::format_type format_type
Definition: texture1d.hpp:43
storage::size_type size_type
Definition: texture1d.hpp:42
Image.
Definition: image.hpp:41
bool empty() const
size_type max_layer() const
size_type max_level() const
storage::texcoord1_type texcoord_type
Definition: texture1d.hpp:41
size_type faces() const
dim1_t dim1_type
Definition: storage.hpp:59
dim_type dimensions() const
size_type max_face() const
format
Definition: format.hpp:33