- cinder::gl::TextureBase::Format
- cinder::gl::Texture1d::Format
Public Member Functions
-
Format ()
Default constructor, sets the target to
GL_TEXTURE_1D, wrap toGL_CLAMP, disables mipmapping, the internal format to "automatic". -
Format &target (GLenum target)
Chaining functions for Format class. Sets the target, defaults to
GL_TEXTURE_1D -
Format &mipmap (bool enableMipmapping=true)
-
Format &maxAnisotropy (float maxAnisotropy)
Sets the maximum amount of anisotropic filtering. A value greater than 1.0 "enables" anisotropic filtering. Maximum of getMaxAnisotropyMax() ;.
-
Format &internalFormat (GLint internalFormat)
-
Format &wrap (GLenum wrap)
-
Format &wrapS (GLenum wrapS)
-
Format &minFilter (GLenum minFilter)
-
Format &magFilter (GLenum magFilter)
-
Format &immutableStorage (bool immutable=true)
Sets whether the storage for the cannot be changed in the future (making glTexImage1D() calls illegal). More efficient when possible. Default is
false. -
Format &label (const std::string &label)
Sets the debugging label associated with the Texture. Calls glObjectLabel() when available.
-
Format &deleter (const std::function< void(Texture1d *)> &sharedPtrDeleter)
Sets a custom deleter for destruction of the shared_ptr<Texture1d>
-
Format &perGpuStorageNV (bool enable=true)
(NVIDIA only) Enables per-gpu storage for multi-gpu multicast.
-
voidsetTarget (GLenum target)
Specifies the texture's target. The default is
GL_TEXTURE_2D. -
voidsetTargetRect ()
Sets the texture's target to be
GL_TEXTURE_RECTANGLE. Not available in OpenGL ES. -
voidenableMipmapping (bool enableMipmapping=true)
Enables or disables mipmapping. Default is disabled.
-
voidsetBaseMipmapLevel (GLuint level)
Specifies the index of the lowest defined mipmap level. Default is
0. Ignored on ES 2. -
voidsetMaxMipmapLevel (GLint level)
Sets the max mipmap level. Default (expressed as
-1) is derived from the size of the texture. Ignored on ES 2. -
GLuintgetBaseMipmapLevel () const
Returns the index of the lowest defined mipmap level.
-
GLuintgetMaxMipmapLevel () const
Returns the max mipmap level.
-
voidsetImmutableStorage (bool immutable=true)
Sets whether the storage for the cannot be changed in the future (making glTexImage*D() calls illegal). More efficient when possible. Default is
false. -
boolisImmutableStorage () const
Returns whether the storage for the cannot be changed in the future (making glTexImage*D() calls illegal). Default is
false. -
voidsetInternalFormat (GLint internalFormat)
Sets the Texture's internal format. A value of -1 implies selecting the best format for the context.
-
voidsetAutoInternalFormat ()
Sets the Texture's internal format to be automatically selected based on the context.
-
voidsetDataType (GLint dataType)
Sets the data type parameter used by glTexImage2D when glTexStorage2D is unavailable. Defaults to
-1which implies automatic determination. Primary use is to passGL_FLOATorGL_HALF_FLOATto create 32F or 16F textures on ES 2 when OES_texture_float is available. -
voidsetAutoDataType ()
Sets the Texture's data type format to be automatically selected based on the context.
-
voidsetCompareMode (GLenum compareMode)
-
voidsetCompareFunc (GLenum compareFunc)
-
GLenumgetCompareMode () const
Returns the texture comparison mode for currently bound depth texture.
-
GLenumgetCompareFunc () const
Returns the comparison operator used when
GL_TEXTURE_COMPARE_MODEis set toGL_COMPARE_R_TO_TEXTURE. -
voidsetWrap (GLenum wrapS, GLenum wrapT)
Sets the wrapping behavior when a texture coordinate falls outside the range of [0,1]. Possible values are
GL_REPEAT,GL_CLAMP_TO_EDGE, etc. Default isGL_CLAMP_TO_EDGE. -
voidsetWrap (GLenum wrapS, GLenum wrapT, GLenum wrapR)
Sets the wrapping behavior when a texture coordinate falls outside the range of [0,1]. Possible values are
GL_REPEAT,GL_CLAMP_TO_EDGE, etc. Default isGL_CLAMP_TO_EDGE. -
voidsetWrapS (GLenum wrapS)
Sets the horizontal wrapping behavior when a texture coordinate falls outside the range of [0,1]. Possible values are
GL_REPEAT,GL_CLAMP_TO_EDGE, etc. Default isGL_CLAMP_TO_EDGE. -
voidsetWrapT (GLenum wrapT)
Sets the vertical wrapping behavior when a texture coordinate falls outside the range of [0,1]. Possible values are
GL_REPEAT,GL_CLAMP_TO_EDGE, etc. Default isGL_CLAMP_TO_EDGE. -
voidsetWrapR (GLenum wrapR)
Sets the depth wrapping behavior when a texture coordinate falls outside the range of [0,1]. Possible values are
GL_REPEAT,GL_CLAMP_TO_EDGE, etc. Default isGL_CLAMP_TO_EDGE. -
voidsetMinFilter (GLenum minFilter)
Sets the filtering behavior when a texture is displayed at a lower resolution than its native resolution. Default is
GL_LINEARunless mipmapping is enabled, in which caseGL_LINEAR_MIPMAP_LINEAR. -
voidsetMagFilter (GLenum magFilter)
Sets the filtering behavior when a texture is displayed at a higher resolution than its native resolution. Default is
GL_LINEAR. -
voidsetMaxAnisotropy (GLfloat maxAnisotropy)
Sets the anisotropic filter amount. A value greater than 1.0 "enables" anisotropic filtering. Maximum of getMaxAnisotropyMax() ;.
-
GLenumgetTarget () const
Returns the texture's target.
-
boolhasMipmapping () const
Returns whether the texture has mipmapping enabled.
-
GLintgetInternalFormat () const
Returns the Texture's internal format. A value of -1 implies automatic selection of the internal format based on the context.
-
boolisAutoInternalFormat () const
Returns whether the Texture's internal format will be automatically selected based on the context.
-
GLintgetDataType () const
Returns the data type parameter used by glTexImage2D when glTexStorage2D is unavailable. Defaults to
-1which implies automatic determination. -
boolisAutoDataType () const
Returns whether the Texture's data type will be automatically selected based on the context.
-
GLenumgetWrapS () const
Returns the horizontal wrapping behavior for the texture coordinates.
-
GLenumgetWrapT () const
Returns the vertical wrapping behavior for the texture coordinates.
-
GLenumgetWrapR () const
Returns the depth wrapping behavior for the texture coordinates.
-
GLenumgetMinFilter () const
Returns the texture minifying function, which is used whenever the pixel being textured maps to an area greater than one texture element.
-
GLenumgetMagFilter () const
Returns the texture magnifying function, which is used whenever the pixel being textured maps to an area less than or equal to one texture element.
-
GLfloatgetMaxAnisotropy () const
Returns the texture anisotropic filtering amount.
-
voidsetIntermediatePbo (const PboRef &intermediatePbo)
Supplies an intermediate PBO that Texture constructors optionally make use of. A PBO of an inadequate size may result in an exception.
-
const PboRef &getIntermediatePbo () const
Returns the optional intermediate PBO that Texture constructors may make use of.
-
voidsetBorderColor (const std::array< GLfloat, 4 > &border)
Sets the texture's border color. Ignored in OpenGL ES.
-
voidsetBorderColor (const ColorA &color)
Sets the texture's border color. Ignored in OpenGL ES.
-
voidsetSwizzleMask (const std::array< GLint, 4 > &swizzleMask)
Sets the swizzle mask corresponding to
GL_TEXTURE_SWIZZLE_RGBA. ExpectsGL_REDthroughGL_ALPHA, orGL_ONEorGL_ZERO. -
voidsetSwizzleMask (GLint r, GLint g, GLint b, GLint a)
Sets the swizzle mask corresponding to
GL_TEXTURE_SWIZZLE_RGBA. ExpectsGL_REDthroughGL_ALPHA, orGL_ONEorGL_ZERO. -
const std::array< GLint, 4 > &getSwizzleMask () const
Returns the swizzle mask corresponding to
GL_TEXTURE_SWIZZLE_RGBA. -
const std::string &getLabel () const
Returns the debugging label associated with the Texture.
-
voidsetLabel (const std::string &label)
Sets the debugging label associated with the Texture. Calls glObjectLabel() when available.
-
boolisPerGpuStorageNV () const
(NVIDIA only) Returns whether per-gpu storage is enabled.
-
voidsetPerGpuStorageNV (bool enable)
(NVIDIA only) Enables per-gpu storage for multi-gpu multicast.
Protected Attributes
-
std::function< void(Texture1d *)>mDeleter
-
friendTexture1d
-
GLenummTarget
-
GLenummWrapS
-
GLenummWrapT
-
GLenummWrapR
-
GLenummMinFilter
-
GLenummMagFilter
-
GLintmCompareMode
-
GLintmCompareFunc
-
boolmMipmapping
-
boolmMipmappingSpecified
-
boolmMinFilterSpecified
-
GLuintmBaseMipmapLevel
-
GLintmMaxMipmapLevel
-
boolmImmutableStorage
-
GLfloatmMaxAnisotropy
-
GLintmInternalFormat
-
GLintmDataType
-
boolmSwizzleSpecified
-
std::array< GLint, 4 >mSwizzleMask
-
boolmBorderSpecified
-
std::array< GLfloat, 4 >mBorderColor
-
std::stringmLabel
-
boolmPerGpuStorageSpecifiedNV
-
boolmPerGpuStorageEnabledNV
-
mIntermediatePbo