|
|
|
|
@ -62,6 +62,9 @@ struct CubeMapTextureGLTest: AbstractOpenGLTester {
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
void samplingDepthStencilMode(); |
|
|
|
|
#endif |
|
|
|
|
#ifdef MAGNUM_TARGET_GLES |
|
|
|
|
void samplingBorder(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
void storage(); |
|
|
|
|
|
|
|
|
|
@ -110,6 +113,9 @@ CubeMapTextureGLTest::CubeMapTextureGLTest() {
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
&CubeMapTextureGLTest::samplingDepthStencilMode, |
|
|
|
|
#endif |
|
|
|
|
#ifdef MAGNUM_TARGET_GLES |
|
|
|
|
&CubeMapTextureGLTest::samplingBorder, |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
&CubeMapTextureGLTest::storage, |
|
|
|
|
|
|
|
|
|
@ -206,8 +212,12 @@ void CubeMapTextureGLTest::sampling() {
|
|
|
|
|
.setBaseLevel(1) |
|
|
|
|
.setMaxLevel(750) |
|
|
|
|
#endif |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
.setWrapping(Sampler::Wrapping::ClampToBorder) |
|
|
|
|
.setBorderColor(Color3(0.5f)) |
|
|
|
|
#else |
|
|
|
|
.setWrapping(Sampler::Wrapping::ClampToEdge) |
|
|
|
|
#endif |
|
|
|
|
.setMaxAnisotropy(Sampler::maxMaxAnisotropy()) |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
.setCompareMode(Sampler::CompareMode::CompareRefToTexture) |
|
|
|
|
@ -301,6 +311,19 @@ 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.")); |
|
|
|
|
|
|
|
|
|
CubeMapTexture texture; |
|
|
|
|
texture.setWrapping(Sampler::Wrapping::ClampToBorder) |
|
|
|
|
.setBorderColor(Color3(0.5f)); |
|
|
|
|
|
|
|
|
|
MAGNUM_VERIFY_NO_ERROR(); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
void CubeMapTextureGLTest::storage() { |
|
|
|
|
CubeMapTexture texture; |
|
|
|
|
texture.setStorage(5, TextureFormat::RGBA8, Vector2i(32)); |
|
|
|
|
|