diff --git a/src/threepp/renderers/GLRenderer.cpp b/src/threepp/renderers/GLRenderer.cpp index c5b03bb7..cbb29287 100644 --- a/src/threepp/renderers/GLRenderer.cpp +++ b/src/threepp/renderers/GLRenderer.cpp @@ -1136,7 +1136,10 @@ struct GLRenderer::Impl { const auto newSize = image.width * image.height * (texture.format == Format::RGB || texture.format == Format::BGR ? 3 : 4); data.resize(newSize); + #ifndef __EMSCRIPTEN__ + // Only run this on desktop OpenGL, not in WebGL glGetTexImage(GL_TEXTURE_2D, 0, gl::toGLFormat(texture.format), gl::toGLType(texture.type), data.data()); + #endif state.unbindTexture(); }