Common texture operations. More...
#include </home/chochlik/devel/oglplus/include/oglplus/texture.hpp>
Public Types | |
typedef TextureTarget | Target |
Texture bind targets. | |
Public Member Functions | |
void | Bind (Target target) const |
Binds this texture to the specified target . More... | |
void | BindImage (ImageUnitSelector unit, GLint level, bool layered, GLint layer, AccessSpecifier access, ImageUnitFormat format) const |
Binds a level of this texture to an image unit . More... | |
void | InvalidateImage (GLsizei level) |
Invalidates the specified level of texture image. More... | |
void | InvalidateSubImage (GLsizei level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth) |
Invalidates the specified part of texture image. More... | |
template<typename GLtype > | |
void | ClearImage (GLsizei level, PixelDataFormat format, const GLtype *data) |
Clears the specified level of texture image. More... | |
template<typename GLtype > | |
void | ClearSubImage (GLsizei level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, const GLtype *data) |
Clears the specified part of texture image. More... | |
void | View (Target target, TextureName orig_texture, PixelDataInternalFormat internal_format, GLuint min_level, GLuint num_levels, GLuint min_layer, GLuint num_layers) |
References and reinteprets a subset of the data of another texture. More... | |
Static Public Member Functions | |
static void | Active (TextureUnitSelector index) |
Specify active texture unit for subsequent commands. More... | |
static GLint | Active (void) |
Returns active texture unit. More... | |
static Target | CubeMapFace (GLuint face) |
Returns the target for the i-th cube map face (0-5) More... | |
static TextureName | Binding (Target target) |
Returns the current Texture bound to specified target . More... | |
static void | Bind (Target target, TextureName texture) |
Binds the specified texture to the specified target . More... | |
static void | Bind (GLuint first, const Sequence< TextureName > &textures) |
Sequentially bind textures to texture units starting with first . More... | |
static void | BindImage (ImageUnitSelector unit, TextureName texture, GLint level, bool layered, GLint layer, AccessSpecifier access, ImageUnitFormat format) |
Binds a level of texture to an image unit . More... | |
static void | BindImage (GLuint first, const Sequence< TextureName > &textures) |
Sequentially bind textures to image units starting with first . More... | |
Common texture operations.
|
static |
Specify active texture unit for subsequent commands.
Error |
|
static |
|
staticinherited |
Binds the specified texture
to the specified target
.
References oglplus::GetGLName().
|
staticinherited |
Sequentially bind textures
to texture units starting with first
.
Error |
References oglplus::GetGLNames(), and oglplus::Sequence< ObjName >::size().
void oglplus::ObjCommonOps< tag::Texture >::Bind | ( | Target | target | ) | const |
Binds this texture to the specified target
.
|
staticinherited |
Binds a level
of texture
to an image unit
.
Requires OpenGL 4.2 or the GL_ARB_shader_image_load_store extension.
References oglplus::GetGLName().
|
staticinherited |
Sequentially bind textures
to image units starting with first
.
Error |
References oglplus::GetGLNames(), and oglplus::Sequence< ObjName >::size().
void oglplus::ObjCommonOps< tag::Texture >::BindImage | ( | ImageUnitSelector | unit, |
GLint | level, | ||
bool | layered, | ||
GLint | layer, | ||
AccessSpecifier | access, | ||
ImageUnitFormat | format | ||
) | const |
Binds a level
of this texture to an image unit
.
Requires OpenGL 4.2 or the GL_ARB_shader_image_load_store extension.
|
staticinherited |
Returns the current Texture bound to specified target
.
void oglplus::ObjCommonOps< tag::Texture >::ClearImage | ( | GLsizei | level, |
PixelDataFormat | format, | ||
const GLtype * | data | ||
) |
Clears the specified level of texture image.
Requires OpenGL 4.4.
void oglplus::ObjCommonOps< tag::Texture >::ClearSubImage | ( | GLsizei | level, |
GLint | xoffs, | ||
GLint | yoffs, | ||
GLint | zoffs, | ||
GLsizei | width, | ||
GLsizei | height, | ||
GLsizei | depth, | ||
PixelDataFormat | format, | ||
const GLtype * | data | ||
) |
Clears the specified part of texture image.
Requires OpenGL 4.4.
|
static |
Returns the target for the i-th cube map face
(0-5)
This functions returns one of the values for cube map faces from the Target enumeration. The value of face
must be between 0 and 5 with the following meaning: 0 = Target::CubeMapPositiveX, 1 = Target::CubeMapNegativeX, 2 = Target::CubeMapPositiveY, 3 = Target::CubeMapNegativeY, 4 = Target::CubeMapPositiveZ, 5 = Target::CubeMapNegativeZ.
void oglplus::ObjCommonOps< tag::Texture >::InvalidateImage | ( | GLsizei | level | ) |
Invalidates the specified level of texture image.
Requires OpenGL 4.3.
void oglplus::ObjCommonOps< tag::Texture >::InvalidateSubImage | ( | GLsizei | level, |
GLint | xoffs, | ||
GLint | yoffs, | ||
GLint | zoffs, | ||
GLsizei | width, | ||
GLsizei | height, | ||
GLsizei | depth | ||
) |
Invalidates the specified part of texture image.
Requires OpenGL 4.3.
void oglplus::ObjCommonOps< tag::Texture >::View | ( | Target | target, |
TextureName | orig_texture, | ||
PixelDataInternalFormat | internal_format, | ||
GLuint | min_level, | ||
GLuint | num_levels, | ||
GLuint | min_layer, | ||
GLuint | num_layers | ||
) |
References and reinteprets a subset of the data of another texture.
Requires OpenGL 4.3 or the GL_ARB_texture_view extension.
References oglplus::GetGLName().