diff --git a/src/threepp/renderers/GLRenderer.cpp b/src/threepp/renderers/GLRenderer.cpp index cdf7bcde..37ff1a3e 100644 --- a/src/threepp/renderers/GLRenderer.cpp +++ b/src/threepp/renderers/GLRenderer.cpp @@ -1120,7 +1120,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(); }