0.8.2 API documentation
texture_cube.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "texture2d.hpp"
7 
8 namespace gli
9 {
11  class texture_cube : public texture
12  {
13  public:
14  typedef extent2d extent_type;
15 
16  public:
18  texture_cube();
19 
22  format_type Format,
23  extent_type const & Extent,
24  size_type Levels,
25  swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
26 
29  format_type Format,
30  extent_type const & Extent,
31  swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
32 
34  explicit texture_cube(
35  texture const& Texture);
36 
39  texture const& Texture,
40  format_type Format,
41  size_type BaseLayer, size_type MaxLayer,
42  size_type BaseFace, size_type MaxFace,
43  size_type BaseLevel, size_type MaxLevel,
44  swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
45 
48  texture_cube const& Texture,
49  size_type BaseFace, size_type MaxFace,
50  size_type BaseLevel, size_type MaxLevel);
51 
53  texture2d operator[](size_type Face) const;
54 
56  extent_type extent(size_type Level = 0) const;
57 
59  template <typename gen_type>
60  gen_type load(extent_type const& TexelCoord, size_type Face, size_type Level) const;
61 
63  template <typename gen_type>
64  void store(extent_type const& TexelCoord, size_type Face, size_type Level, gen_type const& Texel);
65  };
66 }//namespace gli
67 
68 #include "./core/texture_cube.inl"
format
Texture data format.
Definition: format.hpp:12
2d texture
Definition: texture2d.hpp:12
gen_type load(extent_type const &TexelCoord, size_type Face, size_type Level) const
Fetch a texel from a texture. The texture format must be uncompressed.
void store(extent_type const &TexelCoord, size_type Face, size_type Level, gen_type const &Texel)
Write a texel to a texture. The texture format must be uncompressed.
Cube map texture.
Genetic texture class. It can support any target.
Definition: texture.hpp:14
texture_cube()
Create an empty texture cube.
texture2d operator[](size_type Face) const
Create a view of the texture identified by Face in the texture cube.
extent_type extent(size_type Level=0) const
Return the dimensions of a texture instance: width and height where both should be equal...
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
Include to use 2d textures.