| 0.8.1 API documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

texture2d.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 texture2d : public texture
13 {
14 public:
15 typedef extent2d extent_type;
16
18 texture2d();
19
21 texture2d(
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 texture2d(
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 texture2d(
35 texture const& Texture);
36
38 texture2d(
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 texture2d(
48 texture2d 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/texture2d.inl"
gli::texture
Genetic texture class. It can support any target.
Definition: texture.hpp:14
gli::texture2d::operator[]
image operator[](size_type Level) const
Create a view of the image identified by Level in the mipmap chain of the texture.
image.hpp
Include to use images, a representation of a single texture level.
gli::texture2d::texture2d
texture2d()
Create an empty texture 2D.
texture.hpp
Include to use generic textures which can represent any texture target but they don't have target spe...
gli::texture2d::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
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
gli::texture2d
2d texture
Definition: texture2d.hpp:12
gli::image
Image, representation for a single texture level.
Definition: image.hpp:11
gli::texture2d::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.
gli::format
format
Texture data format.
Definition: format.hpp:12
gli::texture2d::extent
extent_type extent(size_type Level=0) const
Return the dimensions of a texture instance: width and height.