changeset 2046:98b44468332e deep-learning

note
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Mar 2023 09:04:10 +0100
parents e5c812a36746
children 0b596428e60c
files OrthancStone/Sources/OpenGL/OpenGLTexture.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp	Sun Mar 05 17:06:31 2023 +0100
+++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp	Mon Mar 06 09:04:10 2023 +0100
@@ -114,9 +114,15 @@
         // Load the texture from the image buffer
         glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height,
                      0, sourceFormat, pixelType, data);
+        ORTHANC_OPENGL_CHECK("glTexImage2D()");
 
 #if !defined(__EMSCRIPTEN__)
-        // glGetTexLevelParameteriv() is not implemented yet in Emscripten 3.1.7
+        /**
+         * glGetTexLevelParameteriv() was introduced in OpenGL ES 3.1,
+         * but WebGL 2 only supports OpenGL ES 3.0, so it is not
+         * available in WebAssembly:
+         * https://registry.khronos.org/OpenGL-Refpages/es3.1/html/glGetTexLevelParameter.xhtml
+         **/
         GLint w, h;
         glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
         glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &h);