| 0.8.2 API documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

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"
gli::format
format
Texture data format.
Definition: format.hpp:12
gli::image
Image, representation for a single texture level.
Definition: image.hpp:11
texture.hpp
Include to use generic textures which can represent any texture target but they don't have target spe...
gli::texture1d::extent
extent_type extent(size_type Level=0) const
Return the width of a texture instance.
gli::texture1d::load
gen_type load(extent_type const &TexelCoord, size_type Level) const
Fetch a texel from a texture. The texture format must be uncompressed.
gli::texture
Genetic texture class. It can support any target.
Definition: texture.hpp:14
gli::texture1d::store
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.
image.hpp
Include to use images, a representation of a single texture level.
gli::texture1d
1d texture
Definition: texture1d.hpp:12
gli
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
gli::texture1d::operator[]
image operator[](size_type Level) const
Create a view of the image identified by Level in the mipmap chain of the texture.
gli::texture1d::texture1d
texture1d()
Create an empty texture 1D.