| 0.8.2 API documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

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
21 texture_cube(
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 texture_cube(
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
38 texture_cube(
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 texture_cube(
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"
gli::format
format
Texture data format.
Definition: format.hpp:12
gli::texture2d
2d texture
Definition: texture2d.hpp:12
gli::texture_cube::load
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.
gli::texture_cube::store
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.
gli::texture_cube
Cube map texture.
Definition: texture_cube.hpp:11
gli::texture
Genetic texture class. It can support any target.
Definition: texture.hpp:14
gli::texture_cube::texture_cube
texture_cube()
Create an empty texture cube.
gli::texture_cube::operator[]
texture2d operator[](size_type Face) const
Create a view of the texture identified by Face in the texture cube.
gli::texture_cube::extent
extent_type extent(size_type Level=0) const
Return the dimensions of a texture instance: width and height where both should be equal...
gli
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
texture2d.hpp
Include to use 2d textures.