Browse Source

Revert "Re-add glDrawRangeElements() workaround for Emscripten."

This reverts commit 6bb0179c65 from 2018,
which in turn reverted commit f6ba4111e1,
which in turn reverted commit 4ce2875262
from 2015. The related Emscripten PR was merged in 2018, so it's safe to
assume everything works as expected nowadays.

Which also means I can finally delete my Emscripten fork that contained
the original branch that attempted to add glDrawRangeElements() in May
2015, before WebGL 2 was even supported in Emscripten, or Firefox.
pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
9ec7f26fae
  1. 2
      doc/changelog.dox
  2. 5
      src/Magnum/GL/Mesh.cpp

2
doc/changelog.dox

@ -598,6 +598,8 @@ See also:
renamed from `EXT_draw_buffers_indexed` and `EXT_clip_cull_distance` in
March 2020 and January 2023. The old names are still recognized and present
in @ref GL::Extensions for compatibility with older browsers.
- Re-enabled @fn_gl{DrawRangeElements} for WebGL 2, this time hopefully for
the last time (see [mosra/magnum#97](https://github.com/mosra/magnum/issues/97))
@subsubsection changelog-latest-changes-math Math library

5
src/Magnum/GL/Mesh.cpp

@ -854,10 +854,7 @@ void Mesh::drawInternal(Int count, Int baseVertex, Int instanceCount, GLintptr i
/* Indexed mesh */
} else {
/** @todo re-enable once https://github.com/kripken/emscripten/pull/7112
is merged and Emscripten versions with this change are
widespread enough */
#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<GLvoid*>(indexByteOffset));

Loading…
Cancel
Save