From f46cda1900d14bb8760dcac4d3d3d38c0b10202d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 Apr 2014 20:02:32 +0200 Subject: [PATCH] Remove redundant ifdefs and docs from desktop-GL-only code. --- src/Magnum/CubeMapTextureArray.h | 8 -------- src/Magnum/MultisampleTexture.h | 2 -- src/Magnum/RectangleTexture.h | 11 ++++------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/Magnum/CubeMapTextureArray.h b/src/Magnum/CubeMapTextureArray.h index a6c09f16a..4cc079709 100644 --- a/src/Magnum/CubeMapTextureArray.h +++ b/src/Magnum/CubeMapTextureArray.h @@ -89,13 +89,11 @@ class CubeMapTextureArray: public AbstractTexture { */ explicit CubeMapTextureArray(): AbstractTexture(GL_TEXTURE_CUBE_MAP_ARRAY) {} - #ifndef MAGNUM_TARGET_GLES2 /** @copydoc Texture::setBaseLevel() */ CubeMapTextureArray& setBaseLevel(Int level) { AbstractTexture::setBaseLevel(level); return *this; } - #endif /** @copydoc Texture::setMaxLevel() */ CubeMapTextureArray& setMaxLevel(Int level) { @@ -127,7 +125,6 @@ class CubeMapTextureArray: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES /** @copydoc Texture::setBorderColor(const Vector4ui&) */ CubeMapTextureArray& setBorderColor(const Vector4ui& color) { AbstractTexture::setBorderColor(color); @@ -139,7 +136,6 @@ class CubeMapTextureArray: public AbstractTexture { AbstractTexture::setBorderColor(color); return *this; } - #endif /** @copydoc Texture::setMaxAnisotropy() */ CubeMapTextureArray& setMaxAnisotropy(Float anisotropy) { @@ -168,14 +164,12 @@ class CubeMapTextureArray: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES /** * @brief Read given mip level of texture to image * @param level Mip level * @param image %Image where to put the data * * See @ref Texture::image(Int, Image&) for more information. - * @requires_gl %Texture image queries are not available in OpenGL ES. */ void image(Int level, Image3D& image) { AbstractTexture::image<3>(GL_TEXTURE_CUBE_MAP_ARRAY, level, image); @@ -189,12 +183,10 @@ class CubeMapTextureArray: public AbstractTexture { * * See @ref Texture::image(Int, BufferImage&, BufferUsage) for more * information. - * @requires_gl %Texture image queries are not available in OpenGL ES. */ void image(Int level, BufferImage3D& image, BufferUsage usage) { AbstractTexture::image<3>(GL_TEXTURE_CUBE_MAP_ARRAY, level, image, usage); } - #endif /** * @brief Set image data diff --git a/src/Magnum/MultisampleTexture.h b/src/Magnum/MultisampleTexture.h index 97c986b6d..3b6f55264 100644 --- a/src/Magnum/MultisampleTexture.h +++ b/src/Magnum/MultisampleTexture.h @@ -77,12 +77,10 @@ template class MultisampleTexture: public AbstractTextur */ explicit MultisampleTexture(): AbstractTexture(Implementation::multisampleTextureTarget()) {} - #ifndef MAGNUM_TARGET_GLES /** @copydoc Texture::imageSize() */ typename DimensionTraits::VectorType imageSize(Int level) { return DataHelper::imageSize(*this, _target, level); } - #endif /** @copydoc Texture::invalidateImage() */ void invalidateImage(Int level) { AbstractTexture::invalidateImage(level); } diff --git a/src/Magnum/RectangleTexture.h b/src/Magnum/RectangleTexture.h index 17a49372c..50673e8e5 100644 --- a/src/Magnum/RectangleTexture.h +++ b/src/Magnum/RectangleTexture.h @@ -103,7 +103,6 @@ class RectangleTexture: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES /** * @brief %Image size * @@ -113,10 +112,8 @@ class RectangleTexture: public AbstractTexture { * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and * @fn_gl{GetTexLevelParameter} or @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access} * with @def_gl{TEXTURE_WIDTH} and @def_gl{TEXTURE_HEIGHT} - * @requires_gl %Texture image queries are not available in OpenGL ES. */ Vector2i imageSize() { return DataHelper<2>::imageSize(*this, _target, 0); } - #endif /** * @brief Set wrapping @@ -300,8 +297,8 @@ class RectangleTexture: public AbstractTexture { /** * @brief Invalidate texture image * - * If running on OpenGL ES or extension @extension{ARB,invalidate_subdata} - * (part of OpenGL 4.3) is not available, this function does nothing. + * If extension @extension{ARB,invalidate_subdata} (part of OpenGL 4.3) + * is not available, this function does nothing. * @see @ref invalidateSubImage(), @fn_gl{InvalidateTexImage} */ void invalidateImage() { AbstractTexture::invalidateImage(0); } @@ -311,8 +308,8 @@ class RectangleTexture: public AbstractTexture { * @param offset Offset into the texture * @param size Size of invalidated data * - * If running on OpenGL ES or extension @extension{ARB,invalidate_subdata} - * (part of OpenGL 4.3) is not available, this function does nothing. + * If extension @extension{ARB,invalidate_subdata} (part of OpenGL 4.3) + * is not available, this function does nothing. * @see @ref invalidateImage(), @fn_gl{InvalidateTexSubImage} */ void invalidateSubImage(const Vector2i& offset, const Vector2i& size) {