Browse Source

Remove redundant ifdefs and docs from desktop-GL-only code.

pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
f46cda1900
  1. 8
      src/Magnum/CubeMapTextureArray.h
  2. 2
      src/Magnum/MultisampleTexture.h
  3. 11
      src/Magnum/RectangleTexture.h

8
src/Magnum/CubeMapTextureArray.h

@ -89,13 +89,11 @@ class CubeMapTextureArray: public AbstractTexture {
*/ */
explicit CubeMapTextureArray(): AbstractTexture(GL_TEXTURE_CUBE_MAP_ARRAY) {} explicit CubeMapTextureArray(): AbstractTexture(GL_TEXTURE_CUBE_MAP_ARRAY) {}
#ifndef MAGNUM_TARGET_GLES2
/** @copydoc Texture::setBaseLevel() */ /** @copydoc Texture::setBaseLevel() */
CubeMapTextureArray& setBaseLevel(Int level) { CubeMapTextureArray& setBaseLevel(Int level) {
AbstractTexture::setBaseLevel(level); AbstractTexture::setBaseLevel(level);
return *this; return *this;
} }
#endif
/** @copydoc Texture::setMaxLevel() */ /** @copydoc Texture::setMaxLevel() */
CubeMapTextureArray& setMaxLevel(Int level) { CubeMapTextureArray& setMaxLevel(Int level) {
@ -127,7 +125,6 @@ class CubeMapTextureArray: public AbstractTexture {
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::setBorderColor(const Vector4ui&) */ /** @copydoc Texture::setBorderColor(const Vector4ui&) */
CubeMapTextureArray& setBorderColor(const Vector4ui& color) { CubeMapTextureArray& setBorderColor(const Vector4ui& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
@ -139,7 +136,6 @@ class CubeMapTextureArray: public AbstractTexture {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return *this; return *this;
} }
#endif
/** @copydoc Texture::setMaxAnisotropy() */ /** @copydoc Texture::setMaxAnisotropy() */
CubeMapTextureArray& setMaxAnisotropy(Float anisotropy) { CubeMapTextureArray& setMaxAnisotropy(Float anisotropy) {
@ -168,14 +164,12 @@ class CubeMapTextureArray: public AbstractTexture {
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES
/** /**
* @brief Read given mip level of texture to image * @brief Read given mip level of texture to image
* @param level Mip level * @param level Mip level
* @param image %Image where to put the data * @param image %Image where to put the data
* *
* See @ref Texture::image(Int, Image&) for more information. * 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) { void image(Int level, Image3D& image) {
AbstractTexture::image<3>(GL_TEXTURE_CUBE_MAP_ARRAY, level, 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 * See @ref Texture::image(Int, BufferImage&, BufferUsage) for more
* information. * information.
* @requires_gl %Texture image queries are not available in OpenGL ES.
*/ */
void image(Int level, BufferImage3D& image, BufferUsage usage) { void image(Int level, BufferImage3D& image, BufferUsage usage) {
AbstractTexture::image<3>(GL_TEXTURE_CUBE_MAP_ARRAY, level, image, usage); AbstractTexture::image<3>(GL_TEXTURE_CUBE_MAP_ARRAY, level, image, usage);
} }
#endif
/** /**
* @brief Set image data * @brief Set image data

2
src/Magnum/MultisampleTexture.h

@ -77,12 +77,10 @@ template<UnsignedInt dimensions> class MultisampleTexture: public AbstractTextur
*/ */
explicit MultisampleTexture(): AbstractTexture(Implementation::multisampleTextureTarget<dimensions>()) {} explicit MultisampleTexture(): AbstractTexture(Implementation::multisampleTextureTarget<dimensions>()) {}
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::imageSize() */ /** @copydoc Texture::imageSize() */
typename DimensionTraits<dimensions, Int>::VectorType imageSize(Int level) { typename DimensionTraits<dimensions, Int>::VectorType imageSize(Int level) {
return DataHelper<dimensions>::imageSize(*this, _target, level); return DataHelper<dimensions>::imageSize(*this, _target, level);
} }
#endif
/** @copydoc Texture::invalidateImage() */ /** @copydoc Texture::invalidateImage() */
void invalidateImage(Int level) { AbstractTexture::invalidateImage(level); } void invalidateImage(Int level) { AbstractTexture::invalidateImage(level); }

11
src/Magnum/RectangleTexture.h

@ -103,7 +103,6 @@ class RectangleTexture: public AbstractTexture {
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES
/** /**
* @brief %Image size * @brief %Image size
* *
@ -113,10 +112,8 @@ class RectangleTexture: public AbstractTexture {
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and
* @fn_gl{GetTexLevelParameter} or @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access} * @fn_gl{GetTexLevelParameter} or @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access}
* with @def_gl{TEXTURE_WIDTH} and @def_gl{TEXTURE_HEIGHT} * 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); } Vector2i imageSize() { return DataHelper<2>::imageSize(*this, _target, 0); }
#endif
/** /**
* @brief Set wrapping * @brief Set wrapping
@ -300,8 +297,8 @@ class RectangleTexture: public AbstractTexture {
/** /**
* @brief Invalidate texture image * @brief Invalidate texture image
* *
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata} * If extension @extension{ARB,invalidate_subdata} (part of OpenGL 4.3)
* (part of OpenGL 4.3) is not available, this function does nothing. * is not available, this function does nothing.
* @see @ref invalidateSubImage(), @fn_gl{InvalidateTexImage} * @see @ref invalidateSubImage(), @fn_gl{InvalidateTexImage}
*/ */
void invalidateImage() { AbstractTexture::invalidateImage(0); } void invalidateImage() { AbstractTexture::invalidateImage(0); }
@ -311,8 +308,8 @@ class RectangleTexture: public AbstractTexture {
* @param offset Offset into the texture * @param offset Offset into the texture
* @param size Size of invalidated data * @param size Size of invalidated data
* *
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata} * If extension @extension{ARB,invalidate_subdata} (part of OpenGL 4.3)
* (part of OpenGL 4.3) is not available, this function does nothing. * is not available, this function does nothing.
* @see @ref invalidateImage(), @fn_gl{InvalidateTexSubImage} * @see @ref invalidateImage(), @fn_gl{InvalidateTexSubImage}
*/ */
void invalidateSubImage(const Vector2i& offset, const Vector2i& size) { void invalidateSubImage(const Vector2i& offset, const Vector2i& size) {

Loading…
Cancel
Save