From 59b6fb2904a81e65a7043aea0fb57b3b31b3d11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 22 Mar 2013 21:28:58 +0100 Subject: [PATCH] Texture border & anisotropy is available only as ES2 extension. --- src/AbstractTexture.h | 6 ++++++ src/CubeMapTexture.h | 4 ++-- src/CubeMapTextureArray.h | 2 ++ src/Texture.h | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 56b636c9f..a67b00430 100644 --- a/src/AbstractTexture.h +++ b/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 diff --git a/src/CubeMapTexture.h b/src/CubeMapTexture.h index 64d72cc99..2a515c686 100644 --- a/src/CubeMapTexture.h +++ b/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; diff --git a/src/CubeMapTextureArray.h b/src/CubeMapTextureArray.h index 619e232cc..859621176 100644 --- a/src/CubeMapTextureArray.h +++ b/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; diff --git a/src/Texture.h b/src/Texture.h index e68ecaf56..9ab67c85b 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -331,7 +331,7 @@ template class Texture: public AbstractTexture { AbstractTexture::setMagnificationFilter(filter); return this; } - #ifndef MAGNUM_TARGET_GLES + #ifndef MAGNUM_TARGET_GLES3 inline Texture* setBorderColor(const Color4<>& color) { AbstractTexture::setBorderColor(color); return this;