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

4
src/CubeMapTexture.h

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

2
src/CubeMapTextureArray.h

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

2
src/Texture.h

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

Loading…
Cancel
Save