class ffw::GLTexture1DArray
Class List > ffw :: GLTexture1DArray
OpenGL texture of type GL_TEXTURE_1D_ARRAY.
Inherits the following classes: ffw::GLTexture
Public Functions
Type | Name |
---|---|
GLTexture1DArray () | |
GLTexture1DArray (const GLTexture1DArray & other) = delete | |
GLTexture1DArray (GLTexture1DArray && other) | |
virtual | ~GLTexture1DArray () = default |
GLTexture1DArray (GLsizei width, GLsizei layers, GLenum internalformat, GLenum format, GLenum pixelformat, const GLvoid * pixels = nullptr) Allocates the texture. | |
void | resize (GLsizei width, GLsizei layers, const GLvoid * pixels = nullptr) Resizes the texture. |
void | setPixels (GLint level, GLint xoffset, GLint loffset, GLsizei width, const GLvoid * pixels) Sets the pixels of the texture section. |
void | setPixels (GLint level, const GLvoid * pixels) Sets the pixels of the entire texture. |
void | getPixels (GLvoid * pixels) const Returns the pixels of the entire texture. |
GLTexture1DArray & | operator= (const GLTexture1DArray & other) = delete |
GLTexture1DArray & | operator= (GLTexture1DArray && other) |
Public Functions Documentation
function GLTexture1DArray (1/4)
ffw::GLTexture1DArray::GLTexture1DArray ()
function GLTexture1DArray (2/4)
ffw::GLTexture1DArray::GLTexture1DArray (
const GLTexture1DArray & other
) = delete
function GLTexture1DArray (3/4)
ffw::GLTexture1DArray::GLTexture1DArray (
GLTexture1DArray && other
)
function ~GLTexture1DArray
virtual ffw::GLTexture1DArray::~GLTexture1DArray () = default
function GLTexture1DArray (4/4)
ffw::GLTexture1DArray::GLTexture1DArray (
GLsizei width,
GLsizei layers,
GLenum internalformat,
GLenum format,
GLenum pixelformat,
const GLvoid * pixels = nullptr
)
Allocates the texture.
Parameters:
- width Specifies the width of the texture image.
- layers Specifies the number of the texture image.
- internalformat Specifies the number of color components in the texture.
- format Specifies the format of the pixel data. The following symbolic values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_RED_INTEGER, GL_RG_INTEGER, GL_RGB_INTEGER, GL_BGR_INTEGER, GL_RGBA_INTEGER, GL_BGRA_INTEGER, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL.
- pixelformat Specifies the data type of the pixel data. The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV. Compressed formats are also supported.
- pixels Optional array to the pixels buffer that will be used to initialise the texture storage. The pixel array must be correct size, otherwise a segmentation fault will occur. If null, the texture storage is not set and initialised with random data.
Exception:
- GLException if something went wrong
The following compressed internalformats are allowed: GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_RG_RGTC2, GL_COMPRESSED_SIGNED_RED_RGTC1, GL_COMPRESSED_SIGNED_RG_RGTC2
Note:
The texture is automatically destroyed once destroy() is called, or the instance of this texture class is freed.
function resize
void ffw::GLTexture1DArray::resize (
GLsizei width,
GLsizei layers,
const GLvoid * pixels = nullptr
)
Resizes the texture.
Parameters:
- width The new width of the texture
- layers The new number of layers
- pixels Optional array to the pixels buffer that will be used to initialise the texture storage. The pixel array must be correct size, otherwise a segmentation fault will occur. If null, the texture storage is not set and initialised with random data.
Note:
The format, internalformat, and pixelformat are unchanged.
Exception:
- GLException if the texture has not been allocated
function setPixels (1/2)
void ffw::GLTexture1DArray::setPixels (
GLint level,
GLint xoffset,
GLint loffset,
GLsizei width,
const GLvoid * pixels
)
Sets the pixels of the texture section.
Parameters:
- level The mipmap level to set. Zero by default.
- xoffset The x offset of the target area to set.
- loffset The layer offset.
- width The width of the area to set.
- pixels Non null pointer to the array of the pixels to upload.
Exception:
- GLException if the texture has not been allocated
function setPixels (2/2)
void ffw::GLTexture1DArray::setPixels (
GLint level,
const GLvoid * pixels
)
Sets the pixels of the entire texture.
Parameters:
- level The mipmap level to set. Zero by default.
- pixels Non null pointer to the array of the pixels to upload.
Exception:
- GLException if the texture has not been allocated
function getPixels
void ffw::GLTexture1DArray::getPixels (
GLvoid * pixels
) const
Returns the pixels of the entire texture.
Parameters:
- pixels Non null pointer to an allocated array that will hold the entire texture data.
Exception:
- GLException if the texture has not been allocated
function operator= (1/2)
GLTexture1DArray & ffw::GLTexture1DArray::operator= (
const GLTexture1DArray & other
) = delete
function operator= (2/2)
GLTexture1DArray & ffw::GLTexture1DArray::operator= (
GLTexture1DArray && other
)
The documentation for this class was generated from the following file: include/ffw/graphics/gltexture1darray.h