OGLplus (0.45.0) a C++ wrapper for OpenGL

An OGLplus object encapsulating the OpenGL texture functionality. More...

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

Inheritance diagram for oglplus::Texture:
Collaboration diagram for oglplus::Texture:

Public Types

typedef TextureTarget Target
 Texture bind and image specification targets. More...
 

Public Member Functions

void Bind (Target target) const
 Bind the texture to the target on the Active unit. 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, const TextureOps &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 Bind (GLuint first, GLsizei count, const GLuint *names)
 Bind the specified textures to the specified texture units. More...
 
static void Unbind (Target target)
 Unbinds the current texture from the target on the Active unit. More...
 
static void BindImage (GLuint first, GLsizei count, const GLuint *names)
 Bind the specified texture images to the specified texture units. More...
 
static void Active (TextureUnitSelector index)
 Specify active texture unit for subsequent commands. More...
 
static GLint Active (void)
 Returns active texture unit. More...
 
static GLsizei Width (Target target, GLint level=0)
 Returns the width of the texture as it was specified by *Image*D. More...
 
static GLsizei Height (Target target, GLint level=0)
 Returns the height of the texture as it was specified by *Image*D. More...
 
static GLsizei Depth (Target target, GLint level=0)
 Returns the depth of the texture as it was specified by *Image*D. More...
 
static PixelDataType RedType (Target target, GLint level=0)
 Returns the data type used to store the RED component. More...
 
static PixelDataType GreenType (Target target, GLint level=0)
 Returns the data type used to store the GREEN component. More...
 
static PixelDataType BlueType (Target target, GLint level=0)
 Returns the data type used to store the BLUE component. More...
 
static PixelDataType AlphaType (Target target, GLint level=0)
 Returns the data type used to store the ALPHA component. More...
 
static PixelDataType DepthType (Target target, GLint level=0)
 Returns the data type used to store the DEPTH component. More...
 
static GLsizei RedSize (Target target, GLint level=0)
 Returns the actual resolution of the RED component. More...
 
static GLsizei GreenSize (Target target, GLint level=0)
 Returns the actual resolution of the GREEN component. More...
 
static GLsizei BlueSize (Target target, GLint level=0)
 Returns the actual resolution of the BLUE component. More...
 
static GLsizei AlphaSize (Target target, GLint level=0)
 Returns the actual resolution of the ALPHA component. More...
 
static GLsizei DepthSize (Target target, GLint level=0)
 Returns the actual resolution of the DEPTH component. More...
 
static GLsizei StencilSize (Target target, GLint level=0)
 Returns the actual resolution of the STENCIL component. More...
 
static GLsizei SharedSize (Target target, GLint level=0)
 Returns the size of all texture components. More...
 
static GLsizei CompressedImageSize (Target target, GLint level=0)
 Returns the size (in bytes) of the image array if it is compressed. More...
 
static PixelDataInternalFormat InternalFormat (Target target, GLint level=0)
 Returns the internal data format of the image array. More...
 
static void GetImage (Target target, GLint level, PixelDataFormat format, Property::PixDataType type, GLsizei size, GLvoid *buffer)
 Allows to obtain the texture image in uncompressed form. More...
 
template<typename T >
static void GetImage (Target target, GLint level, PixelDataFormat format, std::vector< T > &dest)
 Allows to obtain the texture image in uncompressed form. More...
 
static void GetCompressedImage (Target target, GLint level, GLsizei size, GLubyte *buffer)
 Allows to obtain the texture image in compressed form. More...
 
static void GetCompressedImage (Target target, GLint level, std::vector< GLubyte > &dest)
 Allows to obtain the texture image in compressed form. More...
 
static void Image3D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a three dimensional texture image. More...
 
static void Image3D (Target target, const images::Image &image, GLint level=0, GLint border=0)
 Specifies a three dimensional texture image. More...
 
static void SubImage3D (Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a three dimensional texture sub image. More...
 
static void SubImage3D (Target target, const images::Image &image, GLint xoffs, GLint yoffs, GLint zoffs, GLint level=0)
 Specifies a three dimensional texture sub image. More...
 
static void Image2D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a two dimensional texture image. More...
 
static void Image2D (Target target, const images::Image &image, GLint level=0, GLint border=0)
 Specifies a two dimensional texture image. More...
 
static void ImageCM (GLuint face, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies the image of the specified cube-map face. More...
 
static void ImageCM (GLuint face, const images::Image &image, GLint level=0, GLint border=0)
 Specifies the image of the specified cube-map face. More...
 
static void SubImage2D (Target target, GLint level, GLint xoffs, GLint yoffs, GLsizei width, GLsizei height, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a two dimensional texture sub image. More...
 
static void SubImage2D (Target target, const images::Image &image, GLint xoffs, GLint yoffs, GLint level=0)
 Specifies a two dimensional texture sub image. More...
 
static void Image1D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLint border, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a one dimensional texture image. More...
 
static void Image1D (Target target, const images::Image &image, GLint level=0, GLint border=0)
 Specifies a one dimensional texture image. More...
 
static void SubImage1D (Target target, GLint level, GLint xoffs, GLsizei width, PixelDataFormat format, Property::PixDataType type, const void *data)
 Specifies a one dimensional texture sub image. More...
 
static void SubImage1D (Target target, const images::Image &image, GLint xoffs, GLint level=0)
 Specifies a two dimensional texture sub image. More...
 
static void Image (Target target, const images::Image &image, GLint level=0, GLint border=0)
 Specifies a texture image. More...
 
static void Image (Target target, const images::ImageSpec &image_spec, GLint level=0, GLint border=0)
 Specifies a texture image. More...
 
static void CopyImage2D (Target target, GLint level, PixelDataInternalFormat internal_format, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 Copies a two dimensional texture image from the framebuffer. More...
 
static void CopyImage1D (Target target, GLint level, PixelDataInternalFormat internal_format, GLint x, GLint y, GLsizei width, GLint border)
 Copies a one dimensional texture image from the framebuffer. More...
 
static void CopySubImage3D (Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLint x, GLint y, GLsizei width, GLsizei height)
 Copies a three dimensional texture sub image from the framebuffer. More...
 
static void CopySubImage2D (Target target, GLint level, GLint xoffs, GLint yoffs, GLint x, GLint y, GLsizei width, GLsizei height)
 Copies a two dimensional texture sub image from the framebuffer. More...
 
static void CopySubImage1D (Target target, GLint level, GLint xoffs, GLint x, GLint y, GLsizei width)
 Copies a one dimensional texture sub image from the framebuffer. More...
 
static void CompressedImage3D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei image_size, const void *data)
 Specifies a three dimensional compressed texture image. More...
 
static void CompressedImage2D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLint border, GLsizei image_size, const void *data)
 Specifies a two dimensional compressed texture image. More...
 
static void CompressedImage1D (Target target, GLint level, PixelDataInternalFormat internal_format, GLsizei width, GLint border, GLsizei image_size, const void *data)
 Specifies a one dimensional compressed texture image. More...
 
static void CompressedSubImage3D (Target target, GLint level, GLint xoffs, GLint yoffs, GLint zoffs, GLsizei width, GLsizei height, GLsizei depth, PixelDataFormat format, GLsizei image_size, const void *data)
 Specifies a three dimensional compressed texture sub image. More...
 
static void CompressedSubImage2D (Target target, GLint level, GLint xoffs, GLint yoffs, GLsizei width, GLsizei height, PixelDataFormat format, GLsizei image_size, const void *data)
 Specifies a two dimensional compressed texture sub image. More...
 
static void CompressedSubImage1D (Target target, GLint level, GLint xoffs, GLsizei width, PixelDataFormat format, GLsizei image_size, const void *data)
 Specifies a one dimensional compressed texture sub image. More...
 
static void Image3DMultisample (Target target, GLsizei samples, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth, bool fixed_sample_locations)
 Sets-up a three dimensional multisample texture. More...
 
static void Image2DMultisample (Target target, GLsizei samples, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, bool fixed_sample_locations)
 Sets-up a two dimensional multisample texture. More...
 
static void Buffer (Target target, PixelDataInternalFormat internal_format, const BufferOps &buffer)
 Assigns a buffer storing the texel data to the texture. More...
 
static void BufferRange (Target target, PixelDataInternalFormat internal_format, const BufferOps &buffer, GLintptr offset, GLsizeiptr size)
 Assigns a buffer range storing the texel data to the texture. More...
 
static void Storage1D (Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width)
 Specifies all levels of 1D texture at the same time. More...
 
static void Storage2D (Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height)
 Specifies all levels of 2D texture at the same time. More...
 
static void Storage3D (Target target, GLsizei levels, PixelDataInternalFormat internal_format, GLsizei width, GLsizei height, GLsizei depth)
 Specifies all levels of 3D texture at the same time. More...
 
static GLuint BaseLevel (Target target)
 Returns the texture base level (TEXTURE_BASE_LEVEL) More...
 
static void BaseLevel (Target target, GLuint level)
 Sets the texture base level (TEXTURE_BASE_LEVEL) More...
 
static Vector< GLfloat, 4 > BorderColor (Target target, TypeTag< GLfloat >)
 Gets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static void BorderColor (Target target, Vector< GLfloat, 4 > color)
 Sets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static Vector< GLint, 4 > BorderColor (Target target, TypeTag< GLint >)
 Gets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static void BorderColor (Target target, Vector< GLint, 4 > color)
 Sets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static Vector< GLuint, 4 > BorderColor (Target target, TypeTag< GLuint >)
 Gets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static void BorderColor (Target target, Vector< GLuint, 4 > color)
 Sets the texture border color (TEXTURE_BORDER_COLOR) More...
 
static TextureCompareMode CompareMode (Target target)
 Gets the compare mode (TEXTURE_COMPARE_MODE) More...
 
static void CompareMode (Target target, TextureCompareMode mode)
 Sets the compare mode (TEXTURE_COMPARE_MODE) More...
 
static CompareFunction CompareFunc (Target target)
 Sets the compare function (TEXTURE_COMPARE_FUNC) More...
 
static void CompareFunc (Target target, CompareFunction func)
 Sets the compare function (TEXTURE_COMPARE_FUNC) More...
 
static GLfloat LODBias (Target target)
 Gets the LOD bias value (TEXTURE_LOD_BIAS) More...
 
static void LODBias (Target target, GLfloat value)
 Sets the LOD bias value (TEXTURE_LOD_BIAS) More...
 
static void Filter (Target target, TextureFilter filter)
 Sets both the minification and magnification filter. More...
 
static TextureMagFilter MagFilter (Target target)
 Gets the magnification filter (TEXTURE_MAG_FILTER) More...
 
static void MagFilter (Target target, TextureMagFilter filter)
 Sets the magnification filter (TEXTURE_MAG_FILTER) More...
 
static TextureMinFilter MinFilter (Target target)
 Gets the minification filter (TEXTURE_MIN_FILTER) More...
 
static void MinFilter (Target target, TextureMinFilter filter)
 Sets the minification filter (TEXTURE_MIN_FILTER) More...
 
static GLfloat MinLOD (Target target)
 Gets minimal LOD value (TEXTURE_MIN_LOD) More...
 
static void MinLOD (Target target, GLfloat value)
 Sets minimal LOD value (TEXTURE_MIN_LOD) More...
 
static GLfloat MaxLOD (Target target)
 Gets maximum LOD value (TEXTURE_MAX_LOD) More...
 
static void MaxLOD (Target target, GLfloat value)
 Sets maximum LOD value (TEXTURE_MAX_LOD) More...
 
static GLint MaxLevel (Target target)
 Gets maximum level value (TEXTURE_MAX_LEVEL) More...
 
static void MaxLevel (Target target, GLint value)
 Sets maximum level value (TEXTURE_MAX_LEVEL) More...
 
static GLfloat MaxAnisotropy (Target target)
 Gets the maximum anisotropy level. More...
 
static GLfloat Anisotropy (Target target)
 Gets the current anisotropy level. More...
 
static void Anisotropy (Target target, GLfloat value)
 Sets the anisotropy level. More...
 
static TextureSwizzle Swizzle (Target target, TextureSwizzleCoord coord)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_*) More...
 
static void Swizzle (Target target, TextureSwizzleCoord coord, TextureSwizzle mode)
 Sets the swizzle parameter (TEXTURE_SWIZZLE_*) More...
 
static TextureSwizzle SwizzleR (Target target)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_R) More...
 
static void SwizzleR (Target target, TextureSwizzle mode)
 Sets the swizzle parameter (TEXTURE_SWIZZLE_R) More...
 
static TextureSwizzle SwizzleG (Target target)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_G) More...
 
static void SwizzleG (Target target, TextureSwizzle mode)
 Sets the swizzle parameter (TEXTURE_SWIZZLE_G) More...
 
static TextureSwizzle SwizzleB (Target target)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_B) More...
 
static void SwizzleB (Target target, TextureSwizzle mode)
 Sets the swizzle parameter (TEXTURE_SWIZZLE_B) More...
 
static TextureSwizzle SwizzleA (Target target)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_A) More...
 
static void SwizzleA (Target target, TextureSwizzle mode)
 Sets the swizzle parameter (TEXTURE_SWIZZLE_A) More...
 
static TextureSwizzleTuple SwizzleRGBA (Target target)
 Gets the swizzle parameter (TEXTURE_SWIZZLE_RGBA) More...
 
static void SwizzleRGBA (Target target, TextureSwizzle mode)
 Sets the RGBA swizzle parameter (TEXTURE_SWIZZLE_RGBA) More...
 
static void SwizzleRGBA (Target target, TextureSwizzle mode_r, TextureSwizzle mode_g, TextureSwizzle mode_b, TextureSwizzle mode_a)
 Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA) More...
 
static void SwizzleRGBA (Target target, const TextureSwizzleTuple &modes)
 Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA) More...
 
static TextureWrap Wrap (Target target, TextureWrapCoord coord)
 Gets the wrap parameter (TEXTURE_WRAP_*) More...
 
static void Wrap (Target target, TextureWrapCoord coord, TextureWrap mode)
 Sets the wrap parameter (TEXTURE_WRAP_*) More...
 
static TextureWrap WrapS (Target target)
 Gets the wrap parameter (TEXTURE_WRAP_S) More...
 
static void WrapS (Target target, TextureWrap mode)
 Sets the wrap parameter (TEXTURE_WRAP_S) More...
 
static TextureWrap WrapT (Target target)
 Gets the wrap parameter (TEXTURE_WRAP_T) More...
 
static void WrapT (Target target, TextureWrap mode)
 Sets the wrap parameter (TEXTURE_WRAP_T) More...
 
static TextureWrap WrapR (Target target)
 Gets the wrap parameter (TEXTURE_WRAP_R) More...
 
static void WrapR (Target target, TextureWrap mode)
 Sets the wrap parameter (TEXTURE_WRAP_R) More...
 
static PixelDataFormat DepthStencilMode (Target target)
 Gets the depth stencil mode parameter (DEPTH_STENCIL_TEXTURE_MODE) More...
 
static void DepthStencilMode (Target target, PixelDataFormat mode)
 Sets the depth stencil mode (DEPTH_STENCIL_TEXTURE_MODE) More...
 
static bool Seamless (Target target)
 Gets the seamless cubemap setting value. More...
 
static void Seamless (Target target, bool enable)
 Sets the seamless cubemap setting. More...
 
static void Barrier (void)
 Ensures that texture writes have been completed. More...
 
static void GenerateMipmap (Target target)
 Generate mipmap for the texture bound to the specified target. More...
 
static Target CubeMapFace (GLuint face)
 Returns the target for the i-th cube map face (0-5) More...
 

Detailed Description

Member Typedef Documentation

Texture bind and image specification targets.

Note
Not all of the values enumerated here are valid bind targets. Some of them are just image specification targets.
Examples:
oglplus/018_newton_landscape.cpp, oglplus/030_light_rays.cpp, oglplus/031_fog.cpp, oglplus/031_motion_blur.cpp, and oglplus/032_object_tracking.cpp.

Member Function Documentation

static void oglplus::DefaultTextureOps::Active ( TextureUnitSelector  index)
staticinherited

Specify active texture unit for subsequent commands.

Exceptions
Error
See Also
Bind
Related OpenGL symbols:
glActiveTexture

References OGLPLUS_VERIFY.

static GLint oglplus::DefaultTextureOps::Active ( void  )
staticinherited

Returns active texture unit.

Exceptions
Error
Related OpenGL symbols:
glGet GL_ACTIVE_TEXTURE
Examples:
oglplus/009_metaballs.cpp, oglplus/017_sky_box.cpp, oglplus/021_overdraw.cpp, oglplus/021_translucent_arrow.cpp, oglplus/021_wooden_crate.cpp, oglplus/022_blender_mesh.cpp, oglplus/022_parallax_map.cpp, oglplus/022_volumetric_light.cpp, oglplus/023_sky.cpp, oglplus/023_waves.cpp, oglplus/025_recursive_texture.cpp, oglplus/025_rendered_texture_mt.cpp, oglplus/026_clouds.cpp, oglplus/026_furry_torus.cpp, oglplus/026_nv_path_rendering.cpp, oglplus/027_brain_scan_vis.cpp, oglplus/027_depth_of_field.cpp, oglplus/027_flow.cpp, oglplus/027_reflected_shape.cpp, oglplus/027_smoke_trails.cpp, oglplus/028_depth_map_sss.cpp, oglplus/028_glass_shape.cpp, oglplus/028_monkeycraft.cpp, oglplus/028_ripples.cpp, oglplus/028_volume.cpp, oglplus/029_fire_hydrant.cpp, oglplus/029_flares.cpp, oglplus/029_gpu_sort_tfb.cpp, oglplus/029_muddy_stones.cpp, oglplus/029_shadow_mapping.cpp, oglplus/029_waves.cpp, oglplus/030_cube_mapping.cpp, oglplus/030_light_rays.cpp, oglplus/030_pin_display.cpp, oglplus/030_pool_tiles.cpp, oglplus/030_rain.cpp, oglplus/031_blob.cpp, oglplus/031_brick_torus.cpp, oglplus/031_fog.cpp, oglplus/031_motion_blur.cpp, oglplus/031_sketch.cpp, oglplus/032_bar_grid.cpp, oglplus/032_object_tracking.cpp, oglplus/032_transitions.cpp, oglplus/033_metal_and_glass.cpp, oglplus/033_steam.cpp, oglplus/034_billiard_balls.cpp, oglplus/040_jelly_cube.cpp, oglplus/041_blob_mt.cpp, standalone/020_oglplus_oalplus.cpp, and standalone/029_mandelbrot_glfw3.cpp.

References OGLPLUS_VERIFY.

static GLsizei oglplus::DefaultTextureOps::AlphaSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the ALPHA component.

See Also
RedSize
GreenSize
BlueSize
DepthSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_ALPHA_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::AlphaSize().

static PixelDataType oglplus::DefaultTextureOps::AlphaType ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the data type used to store the ALPHA component.

See Also
RedType
GreenType
BlueType
DepthType
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_ALPHA_TYPE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::AlphaType().

static GLfloat oglplus::DefaultTextureOps::Anisotropy ( Target  target)
staticinherited

Gets the current anisotropy level.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_MAX_ANISOTROPY_EXT

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Anisotropy().

static void oglplus::DefaultTextureOps::Anisotropy ( Target  target,
GLfloat  value 
)
staticinherited

Sets the anisotropy level.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MAX_ANISOTROPY_EXT

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::Barrier ( void  )
staticinherited

Ensures that texture writes have been completed.

Requires the GL_NV_texture_barrier extension.

Related OpenGL symbols:
glTextureBarrierNV

References OGLPLUS_VERIFY.

static GLuint oglplus::DefaultTextureOps::BaseLevel ( Target  target)
staticinherited

Returns the texture base level (TEXTURE_BASE_LEVEL)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_BASE_LEVEL

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::BaseLevel().

static void oglplus::DefaultTextureOps::BaseLevel ( Target  target,
GLuint  level 
)
staticinherited

Sets the texture base level (TEXTURE_BASE_LEVEL)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_BASE_LEVEL

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

void oglplus::TextureOps::Bind ( Target  target) const
inherited

Bind the texture to the target on the Active unit.

Exceptions
Error
See Also
Active
Unbind
Related OpenGL symbols:
glBindTexture
Examples:
standalone/029_mandelbrot_glfw3.cpp.
static void oglplus::TextureOps::Bind ( GLuint  first,
GLsizei  count,
const GLuint *  names 
)
staticinherited

Bind the specified textures to the specified texture units.

Exceptions
ErrorRequires OpenGL 4.4 or the GL_ARB_multi_bind extension.

References OGLPLUS_VERIFY.

void oglplus::TextureOps::BindImage ( ImageUnitSelector  unit,
GLint  level,
bool  layered,
GLint  layer,
AccessSpecifier  access,
ImageUnitFormat  format 
) const
inherited

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

References OGLPLUS_CHECK.

static void oglplus::TextureOps::BindImage ( GLuint  first,
GLsizei  count,
const GLuint *  names 
)
staticinherited

Bind the specified texture images to the specified texture units.

Exceptions
ErrorRequires OpenGL 4.4 or the GL_ARB_multi_bind extension.

References OGLPLUS_VERIFY.

static GLsizei oglplus::DefaultTextureOps::BlueSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the BLUE component.

See Also
RedSize
GreenSize
AlphaSize
DepthSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_BLUE_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::BlueSize().

static PixelDataType oglplus::DefaultTextureOps::BlueType ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the data type used to store the BLUE component.

See Also
RedType
GreenType
AlphaType
DepthType
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_BLUE_TYPE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::BlueType().

static Vector<GLfloat, 4> oglplus::DefaultTextureOps::BorderColor ( Target  target,
TypeTag< GLfloat >   
)
staticinherited

Gets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::BorderColor().

static void oglplus::DefaultTextureOps::BorderColor ( Target  target,
Vector< GLfloat, 4 >  color 
)
staticinherited

Sets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static Vector<GLint, 4> oglplus::DefaultTextureOps::BorderColor ( Target  target,
TypeTag< GLint >   
)
staticinherited

Gets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::BorderColor ( Target  target,
Vector< GLint, 4 >  color 
)
staticinherited

Sets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static Vector<GLuint, 4> oglplus::DefaultTextureOps::BorderColor ( Target  target,
TypeTag< GLuint >   
)
staticinherited

Gets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::BorderColor ( Target  target,
Vector< GLuint, 4 >  color 
)
staticinherited

Sets the texture border color (TEXTURE_BORDER_COLOR)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_BORDER_COLOR

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::Buffer ( Target  target,
PixelDataInternalFormat  internal_format,
const BufferOps buffer 
)
staticinherited

Assigns a buffer storing the texel data to the texture.

Requires OpenGL 3.1.

Related OpenGL symbols:
glTexBuffer

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Buffer().

static void oglplus::DefaultTextureOps::BufferRange ( Target  target,
PixelDataInternalFormat  internal_format,
const BufferOps buffer,
GLintptr  offset,
GLsizeiptr  size 
)
staticinherited

Assigns a buffer range storing the texel data to the texture.

Requires OpenGL 4.3.

Related OpenGL symbols:
glTexBufferRange

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::BufferRange().

template<typename GLtype >
void oglplus::TextureOps::ClearImage ( GLsizei  level,
PixelDataFormat  format,
const GLtype *  data 
)
inherited

Clears the specified level of texture image.

Requires OpenGL 4.4.

Related OpenGL symbols:
glClearTexImage

References OGLPLUS_CHECK.

template<typename GLtype >
void oglplus::TextureOps::ClearSubImage ( GLsizei  level,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
PixelDataFormat  format,
const GLtype *  data 
)
inherited

Clears the specified part of texture image.

Requires OpenGL 4.4.

Related OpenGL symbols:
glClearTexSubImage

References OGLPLUS_CHECK.

static CompareFunction oglplus::DefaultTextureOps::CompareFunc ( Target  target)
staticinherited

Sets the compare function (TEXTURE_COMPARE_FUNC)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_COMPARE_FUNC

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompareFunc().

static void oglplus::DefaultTextureOps::CompareFunc ( Target  target,
CompareFunction  func 
)
staticinherited

Sets the compare function (TEXTURE_COMPARE_FUNC)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_COMPARE_FUNC

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static TextureCompareMode oglplus::DefaultTextureOps::CompareMode ( Target  target)
staticinherited

Gets the compare mode (TEXTURE_COMPARE_MODE)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_COMPARE_MODE
Examples:
oglplus/030_light_rays.cpp.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompareMode().

static void oglplus::DefaultTextureOps::CompareMode ( Target  target,
TextureCompareMode  mode 
)
staticinherited

Sets the compare mode (TEXTURE_COMPARE_MODE)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_COMPARE_MODE

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::CompressedImage1D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLint  border,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a one dimensional compressed texture image.

Related OpenGL symbols:
glCompressedTexImage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedImage1D().

static void oglplus::DefaultTextureOps::CompressedImage2D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLint  border,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a two dimensional compressed texture image.

Related OpenGL symbols:
glCompressedTexImage2D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedImage2D().

static void oglplus::DefaultTextureOps::CompressedImage3D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLint  border,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a three dimensional compressed texture image.

Related OpenGL symbols:
glCompressedTexImage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedImage3D().

static GLsizei oglplus::DefaultTextureOps::CompressedImageSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the size (in bytes) of the image array if it is compressed.

Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_COMPRESSED_IMAGE_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedImageSize().

static void oglplus::DefaultTextureOps::CompressedSubImage1D ( Target  target,
GLint  level,
GLint  xoffs,
GLsizei  width,
PixelDataFormat  format,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a one dimensional compressed texture sub image.

Related OpenGL symbols:
glCompressedTexSubImage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedSubImage1D().

static void oglplus::DefaultTextureOps::CompressedSubImage2D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLsizei  width,
GLsizei  height,
PixelDataFormat  format,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a two dimensional compressed texture sub image.

Related OpenGL symbols:
glCompressedTexSubImage2D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedSubImage2D().

static void oglplus::DefaultTextureOps::CompressedSubImage3D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
PixelDataFormat  format,
GLsizei  image_size,
const void *  data 
)
staticinherited

Specifies a three dimensional compressed texture sub image.

Related OpenGL symbols:
glCompressedTexSubImage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CompressedSubImage3D().

static void oglplus::DefaultTextureOps::CopyImage1D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLint  x,
GLint  y,
GLsizei  width,
GLint  border 
)
staticinherited

Copies a one dimensional texture image from the framebuffer.

Related OpenGL symbols:
glCopyTexImage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CopyImage1D().

static void oglplus::DefaultTextureOps::CopyImage2D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height,
GLint  border 
)
staticinherited
static void oglplus::DefaultTextureOps::CopySubImage1D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  x,
GLint  y,
GLsizei  width 
)
staticinherited

Copies a one dimensional texture sub image from the framebuffer.

Related OpenGL symbols:
glCopyTexSubImage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CopySubImage1D().

static void oglplus::DefaultTextureOps::CopySubImage2D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
staticinherited

Copies a two dimensional texture sub image from the framebuffer.

Related OpenGL symbols:
glCopyTexSubImage2D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CopySubImage2D().

static void oglplus::DefaultTextureOps::CopySubImage3D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height 
)
staticinherited

Copies a three dimensional texture sub image from the framebuffer.

Related OpenGL symbols:
glCopyTexSubImage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::CopySubImage3D().

static Target oglplus::DefaultTextureOps::CubeMapFace ( GLuint  face)
staticinherited

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.

Examples:
oglplus/017_sky_box.cpp, oglplus/020_cube_mapping.cpp, oglplus/020_icosphere.cpp, oglplus/023_waves.cpp, oglplus/030_cube_mapping.cpp, oglplus/030_rain.cpp, and oglplus/034_billiard_balls.cpp.
static GLsizei oglplus::DefaultTextureOps::Depth ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the depth of the texture as it was specified by *Image*D.

See Also
Width
Height
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_DEPTH

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Depth().

static GLsizei oglplus::DefaultTextureOps::DepthSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the DEPTH component.

See Also
RedSize
GreenSize
BlueSize
AlphaSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_DEPTH_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::DepthSize().

static PixelDataFormat oglplus::DefaultTextureOps::DepthStencilMode ( Target  target)
staticinherited

Gets the depth stencil mode parameter (DEPTH_STENCIL_TEXTURE_MODE)

Requires OpenGL 4.3.

Related OpenGL symbols:
glGetTexParameter GL_DEPTH_STENCIL_TEXTURE_MODE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::DepthStencilMode().

static void oglplus::DefaultTextureOps::DepthStencilMode ( Target  target,
PixelDataFormat  mode 
)
staticinherited

Sets the depth stencil mode (DEPTH_STENCIL_TEXTURE_MODE)

Requires OpenGL 4.3.

Related OpenGL symbols:
glTexParameter GL_DEPTH_STENCIL_TEXTURE_MODE

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static PixelDataType oglplus::DefaultTextureOps::DepthType ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the data type used to store the DEPTH component.

See Also
RedType
GreenType
BlueType
AlphaType
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_DEPTH_TYPE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::DepthType().

static void oglplus::DefaultTextureOps::Filter ( Target  target,
TextureFilter  filter 
)
staticinherited

Sets both the minification and magnification filter.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MIN_FILTER GL_TEXTURE_MAG_FILTER

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Filter().

static void oglplus::DefaultTextureOps::GenerateMipmap ( Target  target)
staticinherited

Generate mipmap for the texture bound to the specified target.

Related OpenGL symbols:
glGenerateMipmap

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::GenerateMipmap().

static void oglplus::DefaultTextureOps::GetCompressedImage ( Target  target,
GLint  level,
GLsizei  size,
GLubyte *  buffer 
)
staticinherited

Allows to obtain the texture image in compressed form.

This function stores the image of the texture bound to the specified texture target with the specified level of detail in compressed form into the dest buffer. This function automatically resizes the buffer so that it can accomodate the texture data.

Related OpenGL symbols:
glGetCompressedTexImage

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::GetCompressedImage().

static void oglplus::DefaultTextureOps::GetCompressedImage ( Target  target,
GLint  level,
std::vector< GLubyte > &  dest 
)
staticinherited

Allows to obtain the texture image in compressed form.

This function stores the image of the texture bound to the specified texture target with the specified level of detail in compressed form into the dest buffer. This function automatically resizes the buffer so that it can accomodate the texture data.

Related OpenGL symbols:
glGetCompressedTexImage
static void oglplus::DefaultTextureOps::GetImage ( Target  target,
GLint  level,
PixelDataFormat  format,
Property::PixDataType  type,
GLsizei  size,
GLvoid *  buffer 
)
staticinherited

Allows to obtain the texture image in uncompressed form.

This function stores the image of the texture bound to the specified texture target with the specified level of detail in uncompressed form into the dest buffer.

Note
This function, unlike GetCompressedImage, does NOT automatically resize the destination buffer so that it can accomodate the texture data. The caller is responsible for keeping track or querying the type of the texture, its dimensions and current pixel transfer settings and resize the dest buffer accordingly.
Related OpenGL symbols:
glGetTexImage

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::GetImage(), and oglplus::DefaultTextureOps::GetImage().

template<typename T >
static void oglplus::DefaultTextureOps::GetImage ( Target  target,
GLint  level,
PixelDataFormat  format,
std::vector< T > &  dest 
)
staticinherited

Allows to obtain the texture image in uncompressed form.

This function stores the image of the texture bound to the specified texture target with the specified level of detail in uncompressed form into the dest buffer.

Note
This function, unlike GetCompressedImage, does NOT automatically resize the destination buffer so that it can accomodate the texture data. The caller is responsible for keeping track or querying the type of the texture, its dimensions and current pixel transfer settings and resize the dest buffer accordingly.
Related OpenGL symbols:
glGetTexImage

References oglplus::DefaultTextureOps::GetImage(), and oglplus::T.

static GLsizei oglplus::DefaultTextureOps::GreenSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the GREEN component.

See Also
RedSize
BlueSize
AlphaSize
DepthSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_GREEN_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::GreenSize().

static PixelDataType oglplus::DefaultTextureOps::GreenType ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the data type used to store the GREEN component.

See Also
RedType
BlueType
AlphaType
DepthType
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_GREEN_TYPE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::GreenType().

static GLsizei oglplus::DefaultTextureOps::Height ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the height of the texture as it was specified by *Image*D.

See Also
Width
Depth
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_HEIGHT

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Height().

static void oglplus::DefaultTextureOps::Image ( Target  target,
const images::Image image,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies a texture image.

Related OpenGL symbols:
glTexImage3D glTexImage2D glTexImage1D

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Image().

static void oglplus::DefaultTextureOps::Image ( Target  target,
const images::ImageSpec &  image_spec,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies a texture image.

Related OpenGL symbols:
glTexImage3D glTexImage2D glTexImage1D
static void oglplus::DefaultTextureOps::Image1D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLint  border,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited
static void oglplus::DefaultTextureOps::Image1D ( Target  target,
const images::Image image,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies a one dimensional texture image.

Related OpenGL symbols:
glTexImage1D
static void oglplus::DefaultTextureOps::Image2D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLint  border,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited
static void oglplus::DefaultTextureOps::Image2D ( Target  target,
const images::Image image,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies a two dimensional texture image.

Related OpenGL symbols:
glTexImage2D
static void oglplus::DefaultTextureOps::Image2DMultisample ( Target  target,
GLsizei  samples,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
bool  fixed_sample_locations 
)
staticinherited

Sets-up a two dimensional multisample texture.

Requires OpenGL 3.2 or the GL_ARB_texture_multisample extension.

Related OpenGL symbols:
glTexImage2DMultisample

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Image2DMultisample().

static void oglplus::DefaultTextureOps::Image3D ( Target  target,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLint  border,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited

Specifies a three dimensional texture image.

Related OpenGL symbols:
glTexImage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Image3D().

static void oglplus::DefaultTextureOps::Image3D ( Target  target,
const images::Image image,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies a three dimensional texture image.

Related OpenGL symbols:
glTexImage3D
static void oglplus::DefaultTextureOps::Image3DMultisample ( Target  target,
GLsizei  samples,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
bool  fixed_sample_locations 
)
staticinherited

Sets-up a three dimensional multisample texture.

Requires OpenGL 3.2 or the GL_ARB_texture_multisample extension.

Related OpenGL symbols:
glTexImage3DMultisample

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Image3DMultisample().

static void oglplus::DefaultTextureOps::ImageCM ( GLuint  face,
GLint  level,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLint  border,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited

Specifies the image of the specified cube-map face.

Precondition
(face >= 0) && (face <= 5)
Related OpenGL symbols:
glTexImage2D GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
Examples:
oglplus/023_sky.cpp, oglplus/025_multi_viewport.cpp, and oglplus/034_billiard_balls.cpp.

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::ImageCM ( GLuint  face,
const images::Image image,
GLint  level = 0,
GLint  border = 0 
)
staticinherited

Specifies the image of the specified cube-map face.

Precondition
(face >= 0) && (face <= 5)
Related OpenGL symbols:
glTexImage2D GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
static PixelDataInternalFormat oglplus::DefaultTextureOps::InternalFormat ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the internal data format of the image array.

Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_INTERNAL_FORMAT

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::InternalFormat().

void oglplus::TextureOps::InvalidateImage ( GLsizei  level)
inherited

Invalidates the specified level of texture image.

Requires OpenGL 4.3.

Related OpenGL symbols:
glInvalidateTexImage

References OGLPLUS_CHECK.

void oglplus::TextureOps::InvalidateSubImage ( GLsizei  level,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLsizei  width,
GLsizei  height,
GLsizei  depth 
)
inherited

Invalidates the specified part of texture image.

Requires OpenGL 4.3.

Related OpenGL symbols:
glInvalidateTexSubImage

References OGLPLUS_CHECK.

static GLfloat oglplus::DefaultTextureOps::LODBias ( Target  target)
staticinherited

Gets the LOD bias value (TEXTURE_LOD_BIAS)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_LOD_BIAS

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::LODBias().

static void oglplus::DefaultTextureOps::LODBias ( Target  target,
GLfloat  value 
)
staticinherited

Sets the LOD bias value (TEXTURE_LOD_BIAS)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_LOD_BIAS

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static TextureMagFilter oglplus::DefaultTextureOps::MagFilter ( Target  target)
staticinherited
static void oglplus::DefaultTextureOps::MagFilter ( Target  target,
TextureMagFilter  filter 
)
staticinherited

Sets the magnification filter (TEXTURE_MAG_FILTER)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MAG_FILTER

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static GLfloat oglplus::DefaultTextureOps::MaxAnisotropy ( Target  target)
staticinherited

Gets the maximum anisotropy level.

Related OpenGL symbols:
glGetTexParameter GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::MaxAnisotropy().

static GLint oglplus::DefaultTextureOps::MaxLevel ( Target  target)
staticinherited

Gets maximum level value (TEXTURE_MAX_LEVEL)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_MAX_LEVEL

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::MaxLevel().

static void oglplus::DefaultTextureOps::MaxLevel ( Target  target,
GLint  value 
)
staticinherited

Sets maximum level value (TEXTURE_MAX_LEVEL)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MAX_LEVEL

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static GLfloat oglplus::DefaultTextureOps::MaxLOD ( Target  target)
staticinherited

Gets maximum LOD value (TEXTURE_MAX_LOD)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_MAX_LOD
Examples:
oglplus/031_fog.cpp.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::MaxLOD().

static void oglplus::DefaultTextureOps::MaxLOD ( Target  target,
GLfloat  value 
)
staticinherited

Sets maximum LOD value (TEXTURE_MAX_LOD)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MAX_LOD

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static TextureMinFilter oglplus::DefaultTextureOps::MinFilter ( Target  target)
staticinherited
static void oglplus::DefaultTextureOps::MinFilter ( Target  target,
TextureMinFilter  filter 
)
staticinherited

Sets the minification filter (TEXTURE_MIN_FILTER)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MIN_FILTER

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static GLfloat oglplus::DefaultTextureOps::MinLOD ( Target  target)
staticinherited

Gets minimal LOD value (TEXTURE_MIN_LOD)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_MIN_LOD

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::MinLOD().

static void oglplus::DefaultTextureOps::MinLOD ( Target  target,
GLfloat  value 
)
staticinherited

Sets minimal LOD value (TEXTURE_MIN_LOD)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_MIN_LOD

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static GLsizei oglplus::DefaultTextureOps::RedSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the RED component.

See Also
GreenSize
BlueSize
AlphaSize
DepthSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_RED_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::RedSize().

static PixelDataType oglplus::DefaultTextureOps::RedType ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the data type used to store the RED component.

See Also
GreenType
BlueType
AlphaType
DepthType
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_RED_TYPE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::RedType().

static bool oglplus::DefaultTextureOps::Seamless ( Target  target)
staticinherited

Gets the seamless cubemap setting value.

Requires the GL_ARB_seamless_cubemap_per_texture extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_CUBE_MAP_SEAMLESS

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Seamless().

static void oglplus::DefaultTextureOps::Seamless ( Target  target,
bool  enable 
)
staticinherited

Sets the seamless cubemap setting.

Requires the GL_ARB_seamless_cubemap_per_texture extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_CUBE_MAP_SEAMLESS

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static GLsizei oglplus::DefaultTextureOps::SharedSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the size of all texture components.

See Also
RedSize
GreenSize
BlueSize
AlphaSize
DepthSize
StencilSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_SHARED_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SharedSize().

static GLsizei oglplus::DefaultTextureOps::StencilSize ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the actual resolution of the STENCIL component.

See Also
RedSize
GreenSize
BlueSize
AlphaSize
DepthSize
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_STENCIL_SIZE

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::StencilSize().

static void oglplus::DefaultTextureOps::Storage1D ( Target  target,
GLsizei  levels,
PixelDataInternalFormat  internal_format,
GLsizei  width 
)
staticinherited

Specifies all levels of 1D texture at the same time.

Requires OpenGL 4.2 or the GL_ARB_texture_storage extension.

Related OpenGL symbols:
glTexStorage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Storage1D().

static void oglplus::DefaultTextureOps::Storage2D ( Target  target,
GLsizei  levels,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height 
)
staticinherited

Specifies all levels of 2D texture at the same time.

Requires OpenGL 4.2 or the GL_ARB_texture_storage extension.

Related OpenGL symbols:
glTexStorage2D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Storage2D().

static void oglplus::DefaultTextureOps::Storage3D ( Target  target,
GLsizei  levels,
PixelDataInternalFormat  internal_format,
GLsizei  width,
GLsizei  height,
GLsizei  depth 
)
staticinherited

Specifies all levels of 3D texture at the same time.

Requires OpenGL 4.2 or the GL_ARB_texture_storage extension.

Related OpenGL symbols:
glTexStorage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Storage3D().

static void oglplus::DefaultTextureOps::SubImage1D ( Target  target,
GLint  level,
GLint  xoffs,
GLsizei  width,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited

Specifies a one dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage1D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SubImage1D().

static void oglplus::DefaultTextureOps::SubImage1D ( Target  target,
const images::Image image,
GLint  xoffs,
GLint  level = 0 
)
staticinherited

Specifies a two dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage1D
static void oglplus::DefaultTextureOps::SubImage2D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLsizei  width,
GLsizei  height,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited

Specifies a two dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage2D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SubImage2D().

static void oglplus::DefaultTextureOps::SubImage2D ( Target  target,
const images::Image image,
GLint  xoffs,
GLint  yoffs,
GLint  level = 0 
)
staticinherited

Specifies a two dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage2D
static void oglplus::DefaultTextureOps::SubImage3D ( Target  target,
GLint  level,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
PixelDataFormat  format,
Property::PixDataType  type,
const void *  data 
)
staticinherited

Specifies a three dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage3D

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SubImage3D().

static void oglplus::DefaultTextureOps::SubImage3D ( Target  target,
const images::Image image,
GLint  xoffs,
GLint  yoffs,
GLint  zoffs,
GLint  level = 0 
)
staticinherited

Specifies a three dimensional texture sub image.

Related OpenGL symbols:
glTexSubImage3D
static TextureSwizzle oglplus::DefaultTextureOps::Swizzle ( Target  target,
TextureSwizzleCoord  coord 
)
staticinherited
static void oglplus::DefaultTextureOps::Swizzle ( Target  target,
TextureSwizzleCoord  coord,
TextureSwizzle  mode 
)
staticinherited

Sets the swizzle parameter (TEXTURE_SWIZZLE_*)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static TextureSwizzle oglplus::DefaultTextureOps::SwizzleA ( Target  target)
staticinherited

Gets the swizzle parameter (TEXTURE_SWIZZLE_A)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_SWIZZLE_A

References oglplus::A, and oglplus::DefaultTextureOps::Swizzle().

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SwizzleA().

static void oglplus::DefaultTextureOps::SwizzleA ( Target  target,
TextureSwizzle  mode 
)
staticinherited

Sets the swizzle parameter (TEXTURE_SWIZZLE_A)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_A

References oglplus::A, and oglplus::DefaultTextureOps::Swizzle().

static TextureSwizzle oglplus::DefaultTextureOps::SwizzleB ( Target  target)
staticinherited

Gets the swizzle parameter (TEXTURE_SWIZZLE_B)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_SWIZZLE_B

References oglplus::B, and oglplus::DefaultTextureOps::Swizzle().

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SwizzleB().

static void oglplus::DefaultTextureOps::SwizzleB ( Target  target,
TextureSwizzle  mode 
)
staticinherited

Sets the swizzle parameter (TEXTURE_SWIZZLE_B)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_B

References oglplus::B, and oglplus::DefaultTextureOps::Swizzle().

static TextureSwizzle oglplus::DefaultTextureOps::SwizzleG ( Target  target)
staticinherited

Gets the swizzle parameter (TEXTURE_SWIZZLE_G)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_SWIZZLE_G

References oglplus::G, and oglplus::DefaultTextureOps::Swizzle().

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SwizzleG().

static void oglplus::DefaultTextureOps::SwizzleG ( Target  target,
TextureSwizzle  mode 
)
staticinherited

Sets the swizzle parameter (TEXTURE_SWIZZLE_G)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_G

References oglplus::G, and oglplus::DefaultTextureOps::Swizzle().

static TextureSwizzle oglplus::DefaultTextureOps::SwizzleR ( Target  target)
staticinherited

Gets the swizzle parameter (TEXTURE_SWIZZLE_R)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_SWIZZLE_R

References oglplus::R, and oglplus::DefaultTextureOps::Swizzle().

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SwizzleR().

static void oglplus::DefaultTextureOps::SwizzleR ( Target  target,
TextureSwizzle  mode 
)
staticinherited

Sets the swizzle parameter (TEXTURE_SWIZZLE_R)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_R

References oglplus::R, and oglplus::DefaultTextureOps::Swizzle().

static TextureSwizzleTuple oglplus::DefaultTextureOps::SwizzleRGBA ( Target  target)
staticinherited

Gets the swizzle parameter (TEXTURE_SWIZZLE_RGBA)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_SWIZZLE_RGBA

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::SwizzleRGBA().

static void oglplus::DefaultTextureOps::SwizzleRGBA ( Target  target,
TextureSwizzle  mode 
)
staticinherited

Sets the RGBA swizzle parameter (TEXTURE_SWIZZLE_RGBA)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_RGBA

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::SwizzleRGBA ( Target  target,
TextureSwizzle  mode_r,
TextureSwizzle  mode_g,
TextureSwizzle  mode_b,
TextureSwizzle  mode_a 
)
staticinherited

Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_RGBA

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::DefaultTextureOps::SwizzleRGBA ( Target  target,
const TextureSwizzleTuple modes 
)
staticinherited

Sets the RGBA swizzle parameters (TEXTURE_SWIZZLE_RGBA)

Requires OpenGL 3.3 or the GL_ARB_texture_swizzle extension.

Related OpenGL symbols:
glTexParameter GL_TEXTURE_SWIZZLE_RGBA

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static void oglplus::TextureOps::Unbind ( Target  target)
staticinherited

Unbinds the current texture from the target on the Active unit.

Deprecated:
This function is deprecated and will be removed in the next release, Use DefaultTexture::Bind() instead.
Exceptions
Error
See Also
Active
Bind
Related OpenGL symbols:
glBindTexture

References OGLPLUS_VERIFY.

void oglplus::TextureOps::View ( Target  target,
const TextureOps orig_texture,
PixelDataInternalFormat  internal_format,
GLuint  min_level,
GLuint  num_levels,
GLuint  min_layer,
GLuint  num_layers 
)
inherited

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::EnumValueName(), and OGLPLUS_CHECK.

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::View().

static GLsizei oglplus::DefaultTextureOps::Width ( Target  target,
GLint  level = 0 
)
staticinherited

Returns the width of the texture as it was specified by *Image*D.

See Also
Height
Depth
Related OpenGL symbols:
glGetTexLevelParameter GL_TEXTURE_WIDTH

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::Width().

static TextureWrap oglplus::DefaultTextureOps::Wrap ( Target  target,
TextureWrapCoord  coord 
)
staticinherited
static void oglplus::DefaultTextureOps::Wrap ( Target  target,
TextureWrapCoord  coord,
TextureWrap  mode 
)
staticinherited

Sets the wrap parameter (TEXTURE_WRAP_*)

Related OpenGL symbols:
glTexParameter

References oglplus::EnumValueName(), and OGLPLUS_CHECK.

static TextureWrap oglplus::DefaultTextureOps::WrapR ( Target  target)
staticinherited

Gets the wrap parameter (TEXTURE_WRAP_R)

Related OpenGL symbols:
glGetTexParameter GL_TEXTURE_WRAP_R

References oglplus::R, and oglplus::DefaultTextureOps::Wrap().

Referenced by oglplus::BoundTemplate< Base, BaseParam, TextureOps >::WrapR().

static void oglplus::DefaultTextureOps::WrapR ( Target  target,
TextureWrap  mode 
)
staticinherited

Sets the wrap parameter (TEXTURE_WRAP_R)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_WRAP_R

References oglplus::R, and oglplus::DefaultTextureOps::Wrap().

static TextureWrap oglplus::DefaultTextureOps::WrapS ( Target  target)
staticinherited
static void oglplus::DefaultTextureOps::WrapS ( Target  target,
TextureWrap  mode 
)
staticinherited

Sets the wrap parameter (TEXTURE_WRAP_S)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_WRAP_S

References oglplus::S, and oglplus::DefaultTextureOps::Wrap().

static TextureWrap oglplus::DefaultTextureOps::WrapT ( Target  target)
staticinherited
static void oglplus::DefaultTextureOps::WrapT ( Target  target,
TextureWrap  mode 
)
staticinherited

Sets the wrap parameter (TEXTURE_WRAP_T)

Related OpenGL symbols:
glTexParameter GL_TEXTURE_WRAP_T

References oglplus::T, and oglplus::DefaultTextureOps::Wrap().


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 Wed Apr 30 2014 by Doxygen (version 1.8.4).