0.8.1 API documentation
texture1d.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "texture.hpp"
7 #include "image.hpp"
8 
9 namespace gli
10 {
12  class texture1d : public texture
13  {
14  public:
15  typedef extent1d extent_type;
16 
18  texture1d();
19 
21  texture1d(
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 
28  texture1d(
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 texture1d(
35  texture const& Texture);
36 
38  texture1d(
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 
47  texture1d(
48  texture1d const& Texture,
49  size_type BaseLevel, size_type MaxLevel);
50 
52  image operator[](size_type Level) const;
53 
55  extent_type extent(size_type Level = 0) const;
56 
58  template <typename gen_type>
59  gen_type load(extent_type const& TexelCoord, size_type Level) const;
60 
62  template <typename gen_type>
63  void store(extent_type const& TexelCoord, size_type Level, gen_type const& Texel);
64  };
65 }//namespace gli
66 
67 #include "./core/texture1d.inl"
Genetic texture class. It can support any target.
Definition: texture.hpp:14
Include to use images, a representation of a single texture level.
image operator[](size_type Level) const
Create a view of the image identified by Level in the mipmap chain of the texture.
1d texture
Definition: texture1d.hpp:12
Include to use generic textures which can represent any texture target but they don't have target spe...
texture1d()
Create an empty texture 1D.
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
gen_type load(extent_type const &TexelCoord, size_type Level) const
Fetch a texel from a texture. The texture format must be uncompressed.
Image, representation for a single texture level.
Definition: image.hpp:11
format
Texture data format.
Definition: format.hpp:12
void store(extent_type const &TexelCoord, size_type Level, gen_type const &Texel)
Write a texel to a texture. The texture format must be uncompressed.
extent_type extent(size_type Level=0) const
Return the width of a texture instance.