changeset 2043:f3d756e5503f deep-learning

fix build on wasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 10 Feb 2023 09:13:49 +0100
parents 0fa4c0ca429d
children c9dadbe7c7b0
files OrthancStone/Sources/OpenGL/OpenGLTexture.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp	Fri Feb 03 21:49:09 2023 +0100
+++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp	Fri Feb 10 09:13:49 2023 +0100
@@ -113,6 +113,8 @@
         glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height,
                      0, sourceFormat, pixelType, data);
 
+#if !defined(__EMSCRIPTEN__)
+        // "glGetTexLevelParameteriv()" seems to be undefined on WebGL
         GLint w, h;
         glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
         glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &h);
@@ -124,6 +126,7 @@
                                           boost::lexical_cast<std::string>(width) + " x " +
                                           boost::lexical_cast<std::string>(height));
         }
+#endif
         
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, interpolation);
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, interpolation);