Browse Source

Verify that framebuffer extension is available for test on desktop GL.

pull/51/head
Vladimír Vondruš 13 years ago
parent
commit
bdc77c744b
  1. 15
      src/Test/FramebufferGLTest.cpp
  2. 15
      src/Test/RenderbufferGLTest.cpp

15
src/Test/FramebufferGLTest.cpp

@ -49,6 +49,11 @@ FramebufferGLTest::FramebufferGLTest() {
}
void FramebufferGLTest::construct() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
{
const Framebuffer framebuffer({{32, 16}, {128, 256}});
@ -69,6 +74,11 @@ void FramebufferGLTest::constructCopy() {
}
void FramebufferGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
Framebuffer a({{32, 16}, {128, 256}});
const Int id = a.id();
@ -93,6 +103,11 @@ void FramebufferGLTest::constructMove() {
}
void FramebufferGLTest::label() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
/* No-Op version is tested in AbstractObjectGLTest */
if(!Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::debug_label>())

15
src/Test/RenderbufferGLTest.cpp

@ -49,6 +49,11 @@ RenderbufferGLTest::RenderbufferGLTest() {
}
void RenderbufferGLTest::construct() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
{
const Renderbuffer renderbuffer;
@ -68,6 +73,11 @@ void RenderbufferGLTest::constructCopy() {
}
void RenderbufferGLTest::constructMove() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
Renderbuffer a;
const Int id = a.id();
@ -90,6 +100,11 @@ void RenderbufferGLTest::constructMove() {
}
void RenderbufferGLTest::label() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::framebuffer_object>())
CORRADE_SKIP(Extensions::GL::ARB::framebuffer_object::string() + std::string(" is not available."));
#endif
/* No-Op version is tested in AbstractObjectGLTest */
if(!Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>() &&
!Context::current()->isExtensionSupported<Extensions::GL::EXT::debug_label>())

Loading…
Cancel
Save