0.6.1
texture2d.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "image.hpp"
32 
33 namespace gli
34 {
35  class texture2DArray;
36  class textureCube;
37  class textureCubeArray;
38 
40  class texture2D : public texture
41  {
42  public:
43  typedef dim2_t dim_type;
45 
46  public:
47  texture2D();
48 
50  explicit texture2D(
51  size_type const & Levels,
52  format_type const & Format,
53  dim_type const & Dimensions);
54 
56  explicit texture2D(
57  format_type const & Format,
58  dim_type const & Dimensions);
59 
61  explicit texture2D(
62  storage const & Storage);
63 
65  explicit texture2D(
66  storage const & Storage,
67  format_type const & Format,
71 
73  explicit texture2D(
74  texture2D const & Texture,
75  size_type const & BaseLevel,
76  size_type const & MaxLevel);
77 
79  explicit texture2D(
80  texture2DArray const & Texture,
81  size_type const & BaseLayer,
82  size_type const & BaseLevel, size_type const & MaxLevel);
83 
85  explicit texture2D(
86  textureCube const & Texture,
87  size_type const & BaseFace,
88  size_type const & BaseLevel, size_type const & MaxLevel);
89 
91  explicit texture2D(
92  textureCubeArray const & Texture,
93  size_type const & BaseLayer, size_type const & BaseFace,
94  size_type const & BaseLevel, size_type const & MaxLevel);
95 
96  operator storage() const;
97  image operator[] (size_type const & Level) const;
98 
99  dim_type dimensions() const;
100  glm::ivec4 swizzle() const;
101 
102  template <typename genType>
103  genType fetch(dim_type const & TexelCoord, size_type const & Level);
104  };
105 }//namespace gli
106 
107 
size_t size_type
Definition: texture.hpp:38
glm::vec2 vec2
Definition: type.hpp:52
texture2D
Definition: texture2d.hpp:40
size_type const MaxLayer
Definition: texture.hpp:93
image operator[](size_type const &Level) const
OpenGL Image (gli.g-truc.net)
format
Definition: format.hpp:33
glm::ivec4 swizzle() const
dim_type dimensions() const
glm::ivec4 ivec4
Definition: type.hpp:56
size_type const BaseFace
Definition: texture.hpp:94
glm::tvec2< size_t > dim2_t
Definition: type.hpp:48
size_type const BaseLayer
Definition: texture.hpp:92
size_type const MaxFace
Definition: texture.hpp:95
vec2 texcoord_type
Definition: texture2d.hpp:44
genType fetch(dim_type const &TexelCoord, size_type const &Level)
storage Storage
Definition: texture.hpp:90
size_type const MaxLevel
Definition: texture.hpp:97
format_type const Format
Definition: texture.hpp:91
Image.
Definition: image.hpp:41
size_type const BaseLevel
Definition: texture.hpp:96
dim2_t dim_type
Definition: texture2d.hpp:43