From 8a011b7c4eef8dffd0a9c7c40e0cfe6a153522b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 24 Mar 2014 12:40:23 +0100 Subject: [PATCH] Use more general MAGNUM_TARGET_WEBGL instead of CORRADE_TARGET_EMSCRIPTEN. Only where it matters, though. --- src/Magnum/Context.cpp | 2 +- src/Magnum/Mesh.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index 931daa7d2..5f28b479f 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -314,7 +314,7 @@ Context::Context() { const std::string version = versionString(); #ifndef MAGNUM_TARGET_GLES if(version.compare(0, 4, "2.1 ") == 0) - #elif defined(CORRADE_TARGET_EMSCRIPTEN) + #elif defined(MAGNUM_TARGET_WEBGL) if(version.find("WebGL 1") != std::string::npos) #else if(version.find("OpenGL ES 2.0") != std::string::npos) diff --git a/src/Magnum/Mesh.cpp b/src/Magnum/Mesh.cpp index 250a7f0bd..0ed703735 100644 --- a/src/Magnum/Mesh.cpp +++ b/src/Magnum/Mesh.cpp @@ -148,7 +148,7 @@ Mesh& Mesh::setLabel(const std::string& label) { } Mesh& Mesh::setIndexBuffer(Buffer& buffer, GLintptr offset, IndexType type, UnsignedInt start, UnsignedInt end) { - #if defined(CORRADE_TARGET_NACL) || defined(CORRADE_TARGET_EMSCRIPTEN) + #if defined(CORRADE_TARGET_NACL) || defined(MAGNUM_TARGET_WEBGL) CORRADE_ASSERT(buffer.targetHint() == Buffer::Target::ElementArray, "Mesh::setIndexBuffer(): the buffer has unexpected target hint, expected" << Buffer::Target::ElementArray << "but got" << buffer.targetHint(), *this); #endif @@ -270,7 +270,7 @@ void Mesh::destroyImplementationVAO() { } void Mesh::attributePointerImplementationDefault(const Attribute& attribute) { - #if defined(CORRADE_TARGET_NACL) || defined(CORRADE_TARGET_EMSCRIPTEN) + #if defined(CORRADE_TARGET_NACL) || defined(MAGNUM_TARGET_WEBGL) CORRADE_ASSERT(attribute.buffer->targetHint() == Buffer::Target::Array, "Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::Target::Array << "but got" << attribute.buffer->targetHint(), ); #endif @@ -279,7 +279,7 @@ void Mesh::attributePointerImplementationDefault(const Attribute& attribute) { } void Mesh::attributePointerImplementationVAO(const Attribute& attribute) { - #if defined(CORRADE_TARGET_NACL) || defined(CORRADE_TARGET_EMSCRIPTEN) + #if defined(CORRADE_TARGET_NACL) || defined(MAGNUM_TARGET_WEBGL) CORRADE_ASSERT(attribute.buffer->targetHint() == Buffer::Target::Array, "Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::Target::Array << "but got" << attribute.buffer->targetHint(), ); #endif