# HG changeset patch # User Sebastien Jodogne # Date 1678089850 -3600 # Node ID 98b44468332e6c0e3cc107dde2df612e9c765900 # Parent e5c812a367467881559ef8d1301ae769a97beb20 note diff -r e5c812a36746 -r 98b44468332e OrthancStone/Sources/OpenGL/OpenGLTexture.cpp --- 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);