diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index 930bba84c..90d2616b7 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -1520,15 +1520,19 @@ void AbstractTexture::DataHelper<2>::setWrapping(AbstractTexture& texture, const (texture.*state.parameteriImplementation)(GL_TEXTURE_WRAP_T, GLint(wrapping.y())); } +#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) void AbstractTexture::DataHelper<3>::setWrapping(AbstractTexture& texture, const Array3D& wrapping) { const Implementation::TextureState& state = *Context::current()->state().texture; (texture.*state.parameteriImplementation)(GL_TEXTURE_WRAP_S, GLint(wrapping.x())); (texture.*state.parameteriImplementation)(GL_TEXTURE_WRAP_T, GLint(wrapping.y())); - #ifndef MAGNUM_TARGET_GLES + #ifndef MAGNUM_TARGET_GLES2 (texture.*state.parameteriImplementation)(GL_TEXTURE_WRAP_R, GLint(wrapping.z())); + #else + (texture.*state.parameteriImplementation)(GL_TEXTURE_WRAP_R_OES, GLint(wrapping.z())); #endif } #endif +#endif } diff --git a/src/Magnum/AbstractTexture.h b/src/Magnum/AbstractTexture.h index e80476d45..1380fd526 100644 --- a/src/Magnum/AbstractTexture.h +++ b/src/Magnum/AbstractTexture.h @@ -619,11 +619,9 @@ template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<3> { #ifndef MAGNUM_TARGET_GLES2 static Vector3i imageSize(AbstractTexture& texture, GLint level); #endif - #endif static void setWrapping(AbstractTexture& texture, const Array3D& wrapping); - #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) static void setStorage(AbstractTexture& texture, GLsizei levels, TextureFormat internalFormat, const Vector3i& size); #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/CubeMapTexture.h b/src/Magnum/CubeMapTexture.h index 201513b59..26c62cb20 100644 --- a/src/Magnum/CubeMapTexture.h +++ b/src/Magnum/CubeMapTexture.h @@ -235,8 +235,8 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture { * * See @ref Texture::setWrapping() for more information. */ - CubeMapTexture& setWrapping(const Array3D& wrapping) { - DataHelper<3>::setWrapping(*this, wrapping); + CubeMapTexture& setWrapping(const Array2D& wrapping) { + DataHelper<2>::setWrapping(*this, wrapping); return *this; } diff --git a/src/Magnum/CubeMapTextureArray.h b/src/Magnum/CubeMapTextureArray.h index a104fdef2..ab590ec7a 100644 --- a/src/Magnum/CubeMapTextureArray.h +++ b/src/Magnum/CubeMapTextureArray.h @@ -204,8 +204,8 @@ class MAGNUM_EXPORT CubeMapTextureArray: public AbstractTexture { * * See @ref Texture::setWrapping() for more information. */ - CubeMapTextureArray& setWrapping(const Array3D& wrapping) { - DataHelper<3>::setWrapping(*this, wrapping); + CubeMapTextureArray& setWrapping(const Array2D& wrapping) { + DataHelper<2>::setWrapping(*this, wrapping); return *this; } diff --git a/src/Magnum/TextureArray.h b/src/Magnum/TextureArray.h index 23bed1ede..b78b669ff 100644 --- a/src/Magnum/TextureArray.h +++ b/src/Magnum/TextureArray.h @@ -224,8 +224,8 @@ template class TextureArray: public AbstractTexture { * * See @ref Texture::setWrapping() for more information. */ - TextureArray& setWrapping(const Array& wrapping) { - DataHelper::setWrapping(*this, wrapping); + TextureArray& setWrapping(const Array& wrapping) { + DataHelper::setWrapping(*this, wrapping); return *this; }