OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::ObjCommonOps< tag::Texture > Class Template Reference

Common texture operations. More...

#include </home/chochlik/devel/oglplus/include/oglplus/texture.hpp>

Inheritance diagram for oglplus::ObjCommonOps< tag::Texture >:
Collaboration diagram for oglplus::ObjCommonOps< tag::Texture >:

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...
 

Detailed Description

template<>
class oglplus::ObjCommonOps< tag::Texture >

Common texture operations.

Note
Do not use this class directly, use Texture or DefaultTexture instead.

Member Function Documentation

static void oglplus::ObjCommonOps< tag::Texture >::Active ( TextureUnitSelector  index)
static

Specify active texture unit for subsequent commands.

Exceptions
Error
See Also
Bind
Related OpenGL symbols:
glActiveTexture
static GLint oglplus::ObjCommonOps< tag::Texture >::Active ( void  )
static

Returns active texture unit.

Exceptions
Error
Related OpenGL symbols:
glGet GL_ACTIVE_TEXTURE
static void oglplus::ObjBindingOps< tag::Texture >::Bind ( Target  target,
TextureName  texture 
)
staticinherited

Binds the specified texture to the specified target.

Related OpenGL symbols:
glBindTexture

References oglplus::GetGLName().

static void oglplus::ObjBindingOps< tag::Texture >::Bind ( GLuint  first,
const Sequence< TextureName > &  textures 
)
staticinherited

Sequentially bind textures to texture units starting with first.

Exceptions
Error
Related OpenGL symbols:
glBindTextures Requires OpenGL 4.4 or the GL_ARB_multi_bind extension.

References oglplus::GetGLNames(), and oglplus::Sequence< ObjName >::size().

void oglplus::ObjCommonOps< tag::Texture >::Bind ( Target  target) const

Binds this texture to the specified target.

Related OpenGL symbols:
glBindTexture
static void oglplus::ObjBindingOps< tag::Texture >::BindImage ( ImageUnitSelector  unit,
TextureName  texture,
GLint  level,
bool  layered,
GLint  layer,
AccessSpecifier  access,
ImageUnitFormat  format 
)
staticinherited

Binds a level of texture to an image unit.

Requires OpenGL 4.2 or the GL_ARB_shader_image_load_store extension.

Related OpenGL symbols:
glBindImageTexture

References oglplus::GetGLName().

static void oglplus::ObjBindingOps< tag::Texture >::BindImage ( GLuint  first,
const Sequence< TextureName > &  textures 
)
staticinherited

Sequentially bind textures to image units starting with first.

Exceptions
Error
Related OpenGL symbols:
glBindImageTextures Requires OpenGL 4.4 or the GL_ARB_multi_bind extension.

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.

Related OpenGL symbols:
glBindImageTexture
static TextureName oglplus::ObjBindingOps< tag::Texture >::Binding ( Target  target)
staticinherited

Returns the current Texture bound to specified target.

Related OpenGL symbols:
glGetIntegerv
template<typename GLtype >
void oglplus::ObjCommonOps< tag::Texture >::ClearImage ( GLsizei  level,
PixelDataFormat  format,
const GLtype *  data 
)

Clears the specified level of texture image.

Requires OpenGL 4.4.

Related OpenGL symbols:
glClearTexImage
template<typename GLtype >
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.

Related OpenGL symbols:
glClearTexSubImage
static Target oglplus::ObjCommonOps< tag::Texture >::CubeMapFace ( GLuint  face)
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.

Related OpenGL symbols:
glInvalidateTexImage
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.

Related OpenGL symbols:
glInvalidateTexSubImage
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.

Related OpenGL symbols:
glTextureView

References oglplus::GetGLName().


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/texture.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).