![]() |
Cinder
0.9.1
|
#include <Texture.h>
Inherits cinder::gl::TextureBase::Format.
Public Member Functions | |
Format () | |
Format & | target (GLenum target) |
Format & | mipmap (bool enableMipmapping=true) |
Format & | maxAnisotropy (float maxAnisotropy) |
Format & | internalFormat (GLint internalFormat) |
Format & | dataType (GLint dataType) |
Format & | wrap (GLenum wrap) |
Format & | wrapS (GLenum wrapS) |
Format & | wrapT (GLenum wrapT) |
Format & | wrapR (GLenum wrapR) |
Format & | minFilter (GLenum minFilter) |
Format & | magFilter (GLenum magFilter) |
Format & | compareMode (GLenum compareMode) |
Format & | compareFunc (GLenum compareFunc) |
Format & | swizzleMask (const std::array< GLint, 4 > &swizzleMask) |
Format & | swizzleMask (GLint r, GLint g, GLint b, GLint a) |
Format & | loadTopDown (bool loadTopDown=true) |
Format & | immutableStorage (bool immutable=true) |
Format & | intermediatePbo (const PboRef &intermediatePbo) |
Format & | label (const std::string &label) |
Format & | deleter (const std::function< void(Texture2d *)> &sharedPtrDeleter) |
void | setTarget (GLenum target) |
void | setTargetRect () |
void | enableMipmapping (bool enableMipmapping=true) |
void | setBaseMipmapLevel (GLuint level) |
void | setMaxMipmapLevel (GLint level) |
GLuint | getBaseMipmapLevel () const |
GLuint | getMaxMipmapLevel () const |
void | setImmutableStorage (bool immutable=true) |
bool | isImmutableStorage () const |
void | setInternalFormat (GLint internalFormat) |
void | setAutoInternalFormat () |
void | setDataType (GLint dataType) |
void | setAutoDataType () |
void | setCompareMode (GLenum compareMode) |
void | setCompareFunc (GLenum compareFunc) |
GLenum | getCompareMode () const |
GLenum | getCompareFunc () const |
void | setWrap (GLenum wrapS, GLenum wrapT) |
void | setWrap (GLenum wrapS, GLenum wrapT, GLenum wrapR) |
void | setWrapS (GLenum wrapS) |
void | setWrapT (GLenum wrapT) |
void | setWrapR (GLenum wrapR) |
void | setMinFilter (GLenum minFilter) |
void | setMagFilter (GLenum magFilter) |
void | setMaxAnisotropy (GLfloat maxAnisotropy) |
GLenum | getTarget () const |
bool | hasMipmapping () const |
GLint | getInternalFormat () const |
bool | isAutoInternalFormat () const |
GLint | getDataType () const |
bool | isAutoDataType () const |
GLenum | getWrapS () const |
GLenum | getWrapT () const |
GLenum | getWrapR () const |
GLenum | getMinFilter () const |
GLenum | getMagFilter () const |
GLfloat | getMaxAnisotropy () const |
void | setIntermediatePbo (const PboRef &intermediatePbo) |
const PboRef & | getIntermediatePbo () const |
void | setBorderColor (const std::array< GLfloat, 4 > &border) |
void | setBorderColor (const ColorA &color) |
void | setSwizzleMask (const std::array< GLint, 4 > &swizzleMask) |
void | setSwizzleMask (GLint r, GLint g, GLint b, GLint a) |
const std::array< GLint, 4 > & | getSwizzleMask () const |
const std::string & | getLabel () const |
void | setLabel (const std::string &label) |
Protected Attributes | |
bool | mLoadTopDown |
std::function< void(Texture2d *)> | mDeleter |
friend | Texture2d |
GLenum | mTarget |
GLenum | mWrapS |
GLenum | mWrapT |
GLenum | mWrapR |
GLenum | mMinFilter |
GLenum | mMagFilter |
GLint | mCompareMode |
GLint | mCompareFunc |
bool | mMipmapping |
bool | mMipmappingSpecified |
bool | mMinFilterSpecified |
GLuint | mBaseMipmapLevel |
GLint | mMaxMipmapLevel |
bool | mImmutableStorage |
GLfloat | mMaxAnisotropy |
GLint | mInternalFormat |
GLint | mDataType |
bool | mSwizzleSpecified |
std::array< GLint, 4 > | mSwizzleMask |
bool | mBorderSpecified |
std::array< GLfloat, 4 > | mBorderColor |
std::string | mLabel |
PboRef | mIntermediatePbo |
cinder::gl::Texture2d::Format::Format | ( | ) |
Default constructor, sets the target to GL_TEXTURE_2D
, wrap to GL_CLAMP
, disables mipmapping, the internal format to "automatic".
Format& cinder::gl::Texture2d::Format::mipmap | ( | bool | enableMipmapping = true | ) |
Format& cinder::gl::Texture2d::Format::maxAnisotropy | ( | float | maxAnisotropy | ) |
Sets the maximum amount of anisotropic filtering. A value greater than 1.0 "enables" anisotropic filtering. Maximum of getMaxAnisotropyMax();.
Format& cinder::gl::Texture2d::Format::internalFormat | ( | GLint | internalFormat | ) |
Specifies the internal format for the Texture, used by glTexImage2D or glTexStorage2D when available. Defaults to -1
which implies automatic determination.
Format& cinder::gl::Texture2d::Format::dataType | ( | GLint | dataType | ) |
Specifies the data type parameter used by glTexImage2D when glTexStorage2D is unavailable. Defaults to -1
which implies automatic determination. Primary use is to pass GL_FLOAT
or GL_HALF_FLOAT
to create 32F or 16F textures on ES 2 when OES_texture_float is available.
Format& cinder::gl::Texture2d::Format::wrap | ( | GLenum | wrap | ) |
Format& cinder::gl::Texture2d::Format::wrapS | ( | GLenum | wrapS | ) |
Format& cinder::gl::Texture2d::Format::wrapT | ( | GLenum | wrapT | ) |
Format& cinder::gl::Texture2d::Format::wrapR | ( | GLenum | wrapR | ) |
Format& cinder::gl::Texture2d::Format::minFilter | ( | GLenum | minFilter | ) |
Format& cinder::gl::Texture2d::Format::magFilter | ( | GLenum | magFilter | ) |
Format& cinder::gl::Texture2d::Format::compareMode | ( | GLenum | compareMode | ) |
Format& cinder::gl::Texture2d::Format::compareFunc | ( | GLenum | compareFunc | ) |
Specifies the comparison operator used when GL_TEXTURE_COMPARE_MODE
is set to GL_COMPARE_R_TO_TEXTURE
.
Format& cinder::gl::Texture2d::Format::swizzleMask | ( | const std::array< GLint, 4 > & | swizzleMask | ) |
Format& cinder::gl::Texture2d::Format::swizzleMask | ( | GLint | r, |
GLint | g, | ||
GLint | b, | ||
GLint | a | ||
) |
Format& cinder::gl::Texture2d::Format::loadTopDown | ( | bool | loadTopDown = true | ) |
Specifies whether the Texture should store scanlines top-down in memory. Default is false
. Also marks Texture as top-down when true
.
Format& cinder::gl::Texture2d::Format::immutableStorage | ( | bool | immutable = true | ) |
Sets whether the storage for the cannot be changed in the future (making glTexImage2D() calls illegal). More efficient when possible. Default is false
.
Format& cinder::gl::Texture2d::Format::label | ( | const std::string & | label | ) |
Sets the debugging label associated with the Texture. Calls glObjectLabel() when available.
Format& cinder::gl::Texture2d::Format::deleter | ( | const std::function< void(Texture2d *)> & | sharedPtrDeleter | ) |
Sets a custom deleter for destruction of the shared_ptr<Texture2d>
|
inherited |
Specifies the texture's target. The default is GL_TEXTURE_2D
.
|
inherited |
Sets the texture's target to be GL_TEXTURE_RECTANGLE
. Not available in OpenGL ES.
|
inherited |
Enables or disables mipmapping. Default is disabled.
|
inherited |
Specifies the index of the lowest defined mipmap level. Default is 0
. Ignored on ES 2.
|
inherited |
Sets the max mipmap level. Default (expressed as -1
) is derived from the size of the texture. Ignored on ES 2.
|
inherited |
Returns the index of the lowest defined mipmap level.
|
inherited |
Returns the max mipmap level.
|
inherited |
Sets whether the storage for the cannot be changed in the future (making glTexImage*D() calls illegal). More efficient when possible. Default is false
.
|
inherited |
Returns whether the storage for the cannot be changed in the future (making glTexImage*D() calls illegal). Default is false
.
|
inherited |
Sets the Texture's internal format. A value of -1 implies selecting the best format for the context.
|
inherited |
Sets the Texture's internal format to be automatically selected based on the context.
|
inherited |
Sets the data type parameter used by glTexImage2D when glTexStorage2D is unavailable. Defaults to -1
which implies automatic determination. Primary use is to pass GL_FLOAT
or GL_HALF_FLOAT
to create 32F or 16F textures on ES 2 when OES_texture_float is available.
|
inherited |
Sets the Texture's data type format to be automatically selected based on the context.
|
inherited |
|
inherited |
|
inherited |
Returns the texture comparison mode for currently bound depth texture.
|
inherited |
Returns the comparison operator used when GL_TEXTURE_COMPARE_MODE
is set to GL_COMPARE_R_TO_TEXTURE
.
|
inherited |
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 is GL_CLAMP_TO_EDGE
.
|
inherited |
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 is GL_CLAMP_TO_EDGE
.
|
inherited |
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 is GL_CLAMP_TO_EDGE
.
|
inherited |
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 is GL_CLAMP_TO_EDGE
.
|
inherited |
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 is GL_CLAMP_TO_EDGE
.
|
inherited |
Sets the filtering behavior when a texture is displayed at a lower resolution than its native resolution. Default is GL_LINEAR
unless mipmapping is enabled, in which case GL_LINEAR_MIPMAP_LINEAR
.
|
inherited |
Sets the filtering behavior when a texture is displayed at a higher resolution than its native resolution. Default is GL_LINEAR
.
|
inherited |
Sets the anisotropic filter amount. A value greater than 1.0 "enables" anisotropic filtering. Maximum of getMaxAnisotropyMax();.
|
inherited |
Returns the texture's target.
|
inherited |
Returns whether the texture has mipmapping enabled.
|
inherited |
Returns the Texture's internal format. A value of -1 implies automatic selection of the internal format based on the context.
|
inherited |
Returns whether the Texture's internal format will be automatically selected based on the context.
|
inherited |
Returns the data type parameter used by glTexImage2D when glTexStorage2D is unavailable. Defaults to -1
which implies automatic determination.
|
inherited |
Returns whether the Texture's data type will be automatically selected based on the context.
|
inherited |
Returns the horizontal wrapping behavior for the texture coordinates.
|
inherited |
Returns the vertical wrapping behavior for the texture coordinates.
|
inherited |
Returns the depth wrapping behavior for the texture coordinates.
|
inherited |
Returns the texture minifying function, which is used whenever the pixel being textured maps to an area greater than one texture element.
|
inherited |
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.
|
inherited |
Returns the texture anisotropic filtering amount.
|
inherited |
Supplies an intermediate PBO that Texture constructors optionally make use of. A PBO of an inadequate size may result in an exception.
|
inherited |
Returns the optional intermediate PBO that Texture constructors may make use of.
|
inherited |
Sets the texture's border color. Ignored in OpenGL ES.
|
inherited |
Sets the texture's border color. Ignored in OpenGL ES.
|
inherited |
Sets the swizzle mask corresponding to GL_TEXTURE_SWIZZLE_RGBA
. Expects GL_RED
through GL_ALPHA
, or GL_ONE
or GL_ZERO
.
|
inherited |
Sets the swizzle mask corresponding to GL_TEXTURE_SWIZZLE_RGBA
. Expects GL_RED
through GL_ALPHA
, or GL_ONE
or GL_ZERO
.
|
inherited |
Returns the swizzle mask corresponding to GL_TEXTURE_SWIZZLE_RGBA
.
|
inherited |
Returns the debugging label associated with the Texture.
|
inherited |
Sets the debugging label associated with the Texture. Calls glObjectLabel() when available.
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |