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) {}
#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

2
src/Magnum/MultisampleTexture.h

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

11
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) {

Loading…
Cancel
Save