Browse Source

Texture border & anisotropy is available only as ES2 extension.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
59b6fb2904
  1. 6
      src/AbstractTexture.h
  2. 4
      src/CubeMapTexture.h
  3. 2
      src/CubeMapTextureArray.h
  4. 2
      src/Texture.h

6
src/AbstractTexture.h

@ -152,6 +152,7 @@ class MAGNUM_EXPORT AbstractTexture {
*/ */
ClampToEdge = GL_CLAMP_TO_EDGE, ClampToEdge = GL_CLAMP_TO_EDGE,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Clamp to border color. Coordinates out of range will be clamped * Clamp to border color. Coordinates out of range will be clamped
* to border color (set with setBorderColor()). * to border color (set with setBorderColor()).
@ -162,6 +163,7 @@ class MAGNUM_EXPORT AbstractTexture {
#else #else
ClampToBorder = GL_CLAMP_TO_BORDER_NV ClampToBorder = GL_CLAMP_TO_BORDER_NV
#endif #endif
#endif
}; };
/** /**
@ -995,6 +997,7 @@ class MAGNUM_EXPORT AbstractTexture {
*/ */
static Int maxSupportedLayerCount(); static Int maxSupportedLayerCount();
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Max supported anisotropy * @brief Max supported anisotropy
* *
@ -1005,6 +1008,7 @@ class MAGNUM_EXPORT AbstractTexture {
* @requires_es_extension %Extension @es_extension2{EXT,texture_filter_anisotropic,texture_filter_anisotropic} * @requires_es_extension %Extension @es_extension2{EXT,texture_filter_anisotropic,texture_filter_anisotropic}
*/ */
static Float maxSupportedAnisotropy(); static Float maxSupportedAnisotropy();
#endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
inline explicit AbstractTexture(GLenum target): _target(target) { inline explicit AbstractTexture(GLenum target): _target(target) {
@ -1083,6 +1087,7 @@ class MAGNUM_EXPORT AbstractTexture {
return this; return this;
} }
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Set border color * @brief Set border color
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
@ -1124,6 +1129,7 @@ class MAGNUM_EXPORT AbstractTexture {
(this->*parameterfImplementation)(GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropy); (this->*parameterfImplementation)(GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropy);
return this; return this;
} }
#endif
/** /**
* @brief Invalidate texture image * @brief Invalidate texture image

4
src/CubeMapTexture.h

@ -201,16 +201,16 @@ class CubeMapTexture: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return this; return this;
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES3
inline CubeMapTexture* setBorderColor(const Color4<>& color) { inline CubeMapTexture* setBorderColor(const Color4<>& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return this; return this;
} }
#endif
inline CubeMapTexture* setMaxAnisotropy(Float anisotropy) { inline CubeMapTexture* setMaxAnisotropy(Float anisotropy) {
AbstractTexture::setMaxAnisotropy(anisotropy); AbstractTexture::setMaxAnisotropy(anisotropy);
return this; return this;
} }
#endif
inline CubeMapTexture* generateMipmap() { inline CubeMapTexture* generateMipmap() {
AbstractTexture::generateMipmap(); AbstractTexture::generateMipmap();
return this; return this;

2
src/CubeMapTextureArray.h

@ -217,6 +217,7 @@ class CubeMapTextureArray: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return this; return this;
} }
#ifndef MAGNUM_TARGET_GLES3
inline CubeMapTextureArray* setBorderColor(const Color4<>& color) { inline CubeMapTextureArray* setBorderColor(const Color4<>& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return this; return this;
@ -225,6 +226,7 @@ class CubeMapTextureArray: public AbstractTexture {
AbstractTexture::setMaxAnisotropy(anisotropy); AbstractTexture::setMaxAnisotropy(anisotropy);
return this; return this;
} }
#endif
inline CubeMapTextureArray* generateMipmap() { inline CubeMapTextureArray* generateMipmap() {
AbstractTexture::generateMipmap(); AbstractTexture::generateMipmap();
return this; return this;

2
src/Texture.h

@ -331,7 +331,7 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return this; return this;
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES3
inline Texture<Dimensions>* setBorderColor(const Color4<>& color) { inline Texture<Dimensions>* setBorderColor(const Color4<>& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return this; return this;

Loading…
Cancel
Save