Mercurial > hg > orthanc-stone
changeset 945:2db3ef713664 toa2019080601
Fixed error handling for WebGL context creation
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 06 Aug 2019 15:06:53 +0200 |
parents | 8b9bc91eda6b |
children | dbe3e1e47019 |
files | Framework/OpenGL/WebAssemblyOpenGLContext.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Mon Aug 05 12:28:38 2019 +0200 +++ b/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Tue Aug 06 15:06:53 2019 +0200 @@ -49,7 +49,7 @@ emscripten_webgl_init_context_attributes(&attr); context_ = emscripten_webgl_create_context(canvas.c_str(), &attr); - if (context_ < 0) + if (context_ == 0) { std::string message("Cannot create an OpenGL context for canvas: "); message += canvas;