Browse Source

Implemented EXT_texture_border_clamp AEP extension.

Replaced NV_texture_border_clamp enum values with EXT ones, as this is a
superset of the NV extension.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
4276d65a75
  1. 2
      doc/opengl-support.dox
  2. 52
      src/Magnum/AbstractTexture.cpp
  3. 6
      src/Magnum/AbstractTexture.h
  4. 22
      src/Magnum/CubeMapTexture.h
  5. 2
      src/Magnum/Implementation/TextureState.cpp
  6. 2
      src/Magnum/Implementation/TextureState.h
  7. 6
      src/Magnum/Sampler.h
  8. 18
      src/Magnum/Test/CubeMapTextureGLTest.cpp
  9. 20
      src/Magnum/Test/TextureArrayGLTest.cpp
  10. 32
      src/Magnum/Test/TextureGLTest.cpp
  11. 22
      src/Magnum/Texture.h
  12. 16
      src/Magnum/TextureArray.h

2
doc/opengl-support.dox

@ -366,7 +366,7 @@ Extension | Status
@es_extension{EXT,gpu_shader5} | done (shading language only)
@es_extension{EXT,shader_io_blocks} | done (shading language only)
@es_extension{EXT,tessellation_shader} | |
@es_extension{EXT,texture_border_clamp} | |
@es_extension{EXT,texture_border_clamp} | done
@es_extension{EXT,texture_buffer} | |
@es_extension{EXT,texture_cube_map_array} | |
@es_extension{EXT,primitive_bounding_box} | |

52
src/Magnum/AbstractTexture.cpp

@ -332,23 +332,37 @@ void AbstractTexture::setLodBias(const Float bias) {
#ifndef MAGNUM_TARGET_WEBGL
void AbstractTexture::setBorderColor(const Color4& color) {
#ifndef MAGNUM_TARGET_GLES
(this->*Context::current()->state().texture->parameterfvImplementation)(GL_TEXTURE_BORDER_COLOR, color.data());
#else
(this->*Context::current()->state().texture->parameterfvImplementation)(GL_TEXTURE_BORDER_COLOR_NV, color.data());
#endif
(this->*Context::current()->state().texture->parameterfvImplementation)(
#ifndef MAGNUM_TARGET_GLES
GL_TEXTURE_BORDER_COLOR,
#else
GL_TEXTURE_BORDER_COLOR_EXT,
#endif
color.data());
}
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_GLES2
void AbstractTexture::setBorderColor(const Vector4ui& color) {
(this->*Context::current()->state().texture->parameterIuivImplementation)(GL_TEXTURE_BORDER_COLOR, color.data());
(this->*Context::current()->state().texture->parameterIuivImplementation)(
#ifndef MAGNUM_TARGET_GLES
GL_TEXTURE_BORDER_COLOR,
#else
GL_TEXTURE_BORDER_COLOR_EXT,
#endif
color.data());
}
void AbstractTexture::setBorderColor(const Vector4i& color) {
(this->*Context::current()->state().texture->parameterIivImplementation)(GL_TEXTURE_BORDER_COLOR, color.data());
(this->*Context::current()->state().texture->parameterIivImplementation)(
#ifndef MAGNUM_TARGET_GLES
GL_TEXTURE_BORDER_COLOR,
#else
GL_TEXTURE_BORDER_COLOR_EXT,
#endif
color.data());
}
#endif
#endif
void AbstractTexture::setMaxAnisotropy(const Float anisotropy) {
(this->*Context::current()->state().texture->setMaxAnisotropyImplementation)(anisotropy);
@ -926,12 +940,18 @@ void AbstractTexture::parameterImplementationDSAEXT(GLenum parameter, const GLfl
}
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void AbstractTexture::parameterIImplementationDefault(GLenum parameter, const GLuint* values) {
bindInternal();
glTexParameterIuiv(_target, parameter, values);
#ifndef MAGNUM_TARGET_GLES
glTexParameterIuiv
#else
glTexParameterIuivEXT
#endif
(_target, parameter, values);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractTexture::parameterIImplementationDSA(const GLenum parameter, const GLuint* const values) {
glTextureParameterIuiv(_id, parameter, values);
}
@ -940,12 +960,19 @@ void AbstractTexture::parameterIImplementationDSAEXT(GLenum parameter, const GLu
_flags |= ObjectFlag::Created;
glTextureParameterIuivEXT(_id, _target, parameter, values);
}
#endif
void AbstractTexture::parameterIImplementationDefault(GLenum parameter, const GLint* values) {
bindInternal();
glTexParameterIiv(_target, parameter, values);
#ifndef MAGNUM_TARGET_GLES
glTexParameterIiv
#else
glTexParameterIivEXT
#endif
(_target, parameter, values);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractTexture::parameterIImplementationDSA(const GLenum parameter, const GLint* const values) {
glTextureParameterIiv(_id, parameter, values);
}
@ -955,6 +982,7 @@ void AbstractTexture::parameterIImplementationDSAEXT(GLenum parameter, const GLi
glTextureParameterIivEXT(_id, _target, parameter, values);
}
#endif
#endif
void AbstractTexture::setMaxAnisotropyImplementationNoOp(GLfloat) {}

6
src/Magnum/AbstractTexture.h

@ -368,11 +368,11 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject {
#endif
#ifndef MAGNUM_TARGET_WEBGL
void setBorderColor(const Color4& color);
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_GLES2
void setBorderColor(const Vector4i& color);
void setBorderColor(const Vector4ui& color);
#endif
#endif
void setMaxAnisotropy(Float anisotropy);
#ifndef MAGNUM_TARGET_WEBGL
void setSRGBDecode(bool decode);
@ -440,7 +440,7 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject {
void MAGNUM_LOCAL parameterImplementationDefault(GLenum parameter, const GLint* values);
#endif
void MAGNUM_LOCAL parameterImplementationDefault(GLenum parameter, const GLfloat* values);
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void MAGNUM_LOCAL parameterIImplementationDefault(GLenum parameter, const GLuint* values);
void MAGNUM_LOCAL parameterIImplementationDefault(GLenum parameter, const GLint* values);
#endif

22
src/Magnum/CubeMapTexture.h

@ -257,16 +257,17 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture {
*
* See @ref Texture::setBorderColor(const Color4&) for more
* information.
* @requires_es_extension Extension @es_extension{NV,texture_border_clamp}
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp} or
* @es_extension{NV,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
CubeMapTexture& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color);
return *this;
}
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_GLES2
/**
* @copybrief Texture::setBorderColor(const Vector4ui&)
* @return Reference to self (for method chaining)
@ -274,8 +275,11 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture {
* See @ref Texture::setBorderColor(const Vector4ui&) for more
* information.
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension
* @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
CubeMapTexture& setBorderColor(const Vector4ui& color) {
AbstractTexture::setBorderColor(color);
@ -284,14 +288,18 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture {
/** @overload
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension
* @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
CubeMapTexture& setBorderColor(const Vector4i& color) {
AbstractTexture::setBorderColor(color);
return *this;
}
#endif
#endif
/**
* @copybrief Texture::setMaxAnisotropy()

2
src/Magnum/Implementation/TextureState.cpp

@ -165,7 +165,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
parameterivImplementation = &AbstractTexture::parameterImplementationDefault;
#endif
parameterfvImplementation = &AbstractTexture::parameterImplementationDefault;
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
parameterIuivImplementation = &AbstractTexture::parameterIImplementationDefault;
parameterIivImplementation = &AbstractTexture::parameterIImplementationDefault;
#endif

2
src/Magnum/Implementation/TextureState.h

@ -48,7 +48,7 @@ struct TextureState {
void(AbstractTexture::*parameterivImplementation)(GLenum, const GLint*);
#endif
void(AbstractTexture::*parameterfvImplementation)(GLenum, const GLfloat*);
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void(AbstractTexture::*parameterIuivImplementation)(GLenum, const GLuint*);
void(AbstractTexture::*parameterIivImplementation)(GLenum, const GLint*);
#endif

6
src/Magnum/Sampler.h

@ -121,13 +121,15 @@ class MAGNUM_EXPORT Sampler {
* Clamp to border color. Coordinates out of range will be clamped
* to border color (set with
* @ref Texture::setBorderColor() "*Texture::setBorderColor()").
* @requires_es_extension Extension @es_extension{NV,texture_border_clamp}
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp} or
* @es_extension{NV,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
#ifndef MAGNUM_TARGET_GLES
ClampToBorder = GL_CLAMP_TO_BORDER,
#else
ClampToBorder = GL_CLAMP_TO_BORDER_NV,
ClampToBorder = GL_CLAMP_TO_BORDER_EXT,
#endif
#endif

18
src/Magnum/Test/CubeMapTextureGLTest.cpp

@ -56,7 +56,7 @@ struct CubeMapTextureGLTest: AbstractOpenGLTester {
void samplingMaxLevel();
void samplingCompare();
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void samplingBorderInteger();
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -107,7 +107,7 @@ CubeMapTextureGLTest::CubeMapTextureGLTest() {
&CubeMapTextureGLTest::samplingMaxLevel,
&CubeMapTextureGLTest::samplingCompare,
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
&CubeMapTextureGLTest::samplingBorderInteger,
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -278,10 +278,15 @@ void CubeMapTextureGLTest::samplingCompare() {
}
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void CubeMapTextureGLTest::samplingBorderInteger() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
#else
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::EXT::texture_border_clamp::string() + std::string(" is not supported."));
#endif
CubeMapTexture a;
a.setWrapping(Sampler::Wrapping::ClampToBorder)
@ -312,9 +317,10 @@ void CubeMapTextureGLTest::samplingDepthStencilMode() {
#endif
#ifdef MAGNUM_TARGET_GLES
void CubeMapTextureGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::NV::texture_border_clamp::string() + std::string(" is not supported."));
void CubeMapTextureGLTest::samplingBorder() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP("No required extension is supported.");
CubeMapTexture texture;
texture.setWrapping(Sampler::Wrapping::ClampToBorder)

20
src/Magnum/Test/TextureArrayGLTest.cpp

@ -79,7 +79,11 @@ struct TextureArrayGLTest: AbstractOpenGLTester {
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger1D();
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void samplingBorderInteger2D();
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingDepthStencilMode1D();
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -172,7 +176,11 @@ TextureArrayGLTest::TextureArrayGLTest() {
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingBorderInteger1D,
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
&TextureArrayGLTest::samplingBorderInteger2D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingDepthStencilMode1D,
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -524,12 +532,17 @@ void TextureArrayGLTest::samplingCompare2D() {
}
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureArrayGLTest::samplingBorderInteger2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
#else
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::EXT::texture_border_clamp::string() + std::string(" is not supported."));
#endif
Texture2DArray a;
a.setWrapping(Sampler::Wrapping::ClampToBorder)
@ -563,8 +576,9 @@ void TextureArrayGLTest::samplingDepthStencilMode2D() {
#ifdef MAGNUM_TARGET_GLES
void TextureArrayGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::NV::texture_border_clamp::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP("No required extension is supported.");
Texture2DArray texture;
texture.setWrapping(Sampler::Wrapping::ClampToBorder)

32
src/Magnum/Test/TextureGLTest.cpp

@ -89,8 +89,12 @@ struct TextureGLTest: AbstractOpenGLTester {
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger1D();
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void samplingBorderInteger2D();
void samplingBorderInteger3D();
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingDepthStencilMode1D();
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -214,8 +218,12 @@ TextureGLTest::TextureGLTest() {
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingBorderInteger1D,
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
&TextureGLTest::samplingBorderInteger2D,
&TextureGLTest::samplingBorderInteger3D,
#endif
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingDepthStencilMode1D,
#endif
#ifndef MAGNUM_TARGET_GLES2
@ -617,10 +625,15 @@ void TextureGLTest::samplingCompare2D() {
}
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureGLTest::samplingBorderInteger2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
#else
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::EXT::texture_border_clamp::string() + std::string(" is not supported."));
#endif
Texture2D a;
a.setWrapping(Sampler::Wrapping::ClampToBorder)
@ -652,8 +665,9 @@ void TextureGLTest::samplingDepthStencilMode2D() {
#ifdef MAGNUM_TARGET_GLES
void TextureGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::NV::texture_border_clamp::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP("No required extension is supported.");
Texture2D texture;
texture.setWrapping(Sampler::Wrapping::ClampToBorder)
@ -734,10 +748,15 @@ void TextureGLTest::samplingMaxLevel3D() {
}
#endif
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
void TextureGLTest::samplingBorderInteger3D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_integer>())
CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported."));
#else
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::EXT::texture_border_clamp::string() + std::string(" is not supported."));
#endif
Texture3D a;
a.setWrapping(Sampler::Wrapping::ClampToBorder)
@ -774,8 +793,9 @@ void TextureGLTest::samplingBorder3D() {
CORRADE_SKIP(Extensions::GL::OES::texture_3D::string() + std::string(" is not supported."));
#endif
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
CORRADE_SKIP(Extensions::GL::NV::texture_border_clamp::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>())
CORRADE_SKIP("No required extension is supported.");
Texture3D texture;
texture.setWrapping(Sampler::Wrapping::ClampToBorder)

22
src/Magnum/Texture.h

@ -366,16 +366,17 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
* @fn_gl_extension{TextureParameter,EXT,direct_state_access},
* eventually @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and
* @fn_gl{TexParameter} with @def_gl{TEXTURE_BORDER_COLOR}
* @requires_es_extension Extension @es_extension{NV,texture_border_clamp}
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp} or
* @es_extension{NV,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
Texture<dimensions>& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color);
return *this;
}
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_GLES2
/**
* @brief Set border color for integer texture
* @return Reference to self (for method chaining)
@ -391,8 +392,11 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
* eventually @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and
* @fn_gl{TexParameter} with @def_gl{TEXTURE_BORDER_COLOR}
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension
* @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
Texture<dimensions>& setBorderColor(const Vector4ui& color) {
AbstractTexture::setBorderColor(color);
@ -401,14 +405,18 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
/** @overload
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension
* @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
Texture<dimensions>& setBorderColor(const Vector4i& color) {
AbstractTexture::setBorderColor(color);
return *this;
}
#endif
#endif
/**
* @brief Set max anisotropy

16
src/Magnum/TextureArray.h

@ -248,16 +248,16 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
*
* See @ref Texture::setBorderColor(const Color4&) for more
* information.
* @requires_es_extension Extension @es_extension{NV,texture_border_clamp}
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp} or
* @es_extension{NV,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
TextureArray<dimensions>& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color);
return *this;
}
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* @copybrief Texture::setBorderColor(const Vector4ui&)
* @return Reference to self (for method chaining)
@ -265,8 +265,9 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
* See @ref Texture::setBorderColor(const Vector4ui&) for more
* information.
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
TextureArray<dimensions>& setBorderColor(const Vector4ui& color) {
AbstractTexture::setBorderColor(color);
@ -275,8 +276,9 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
/** @overload
* @requires_gl30 Extension @extension{EXT,texture_integer}
* @requires_gl Border clamp is available only for float textures in
* OpenGL ES. Border clamp is not available in WebGL.
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,texture_border_clamp}
* @requires_gles Border clamp is not available in WebGL.
*/
TextureArray<dimensions>& setBorderColor(const Vector4i& color) {
AbstractTexture::setBorderColor(color);

Loading…
Cancel
Save