Browse Source

Use more general MAGNUM_TARGET_WEBGL instead of CORRADE_TARGET_EMSCRIPTEN.

Only where it matters, though.
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
8a011b7c4e
  1. 2
      src/Magnum/Context.cpp
  2. 6
      src/Magnum/Mesh.cpp

2
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)

6
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

Loading…
Cancel
Save