From f6ba4111e1669b254da8f0dafdbb5d9cb6df364a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 30 Aug 2018 10:21:03 +0200 Subject: [PATCH] GL: remove obsolete Firefox workaround. Reverts commit 4ce28752626102a2acfcc8a72e057eb2e86b4ad4 from 2015. This is now also worked around directly in Emscripten: https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e273e4dcc554f809738cedd6/src/library_gl.js#L7361 --- doc/changelog.dox | 2 ++ src/Magnum/GL/Mesh.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index b04c0b050..9f56d04df 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -165,6 +165,8 @@ See also: possible as well - The @ref GL::BufferUsage parameter in @ref GL::Buffer::setData() is now optional, defaults to @ref GL::BufferUsage::StaticDraw +- Re-enabled @fn_gl{DrawRangeElements} for WebGL 2 (see + [mosra/magnum#97](https://github.com/mosra/magnum/issues/97)) @subsubsection changelog-latest-changes-math Math library diff --git a/src/Magnum/GL/Mesh.cpp b/src/Magnum/GL/Mesh.cpp index ecff9dd94..a9148da50 100644 --- a/src/Magnum/GL/Mesh.cpp +++ b/src/Magnum/GL/Mesh.cpp @@ -411,8 +411,7 @@ void Mesh::drawInternal(Int count, Int baseVertex, Int instanceCount, GLintptr i /* Indexed mesh */ } else { - /** @todo re-enable for WebGL 2.0 when glDrawRangeElements() no longer crashes Firefox */ - #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) + #ifndef MAGNUM_TARGET_GLES2 /* Indexed mesh with specified range */ if(indexEnd) { glDrawRangeElements(GLenum(_primitive), indexStart, indexEnd, count, GLenum(_indexType), reinterpret_cast(indexOffset));