Mercurial > hg > orthanc-stone
comparison Framework/OpenGL/WebAssemblyOpenGLContext.cpp @ 894:f557b18d287f
wasm: error log if canvas GL context can't be created
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 16 Jul 2019 10:51:03 +0200 |
parents | 0aff28f15ea2 |
children | 685c9a2d115f |
comparison
equal
deleted
inserted
replaced
893:0c5201499af8 | 894:f557b18d287f |
---|---|
47 emscripten_webgl_init_context_attributes(&attr); | 47 emscripten_webgl_init_context_attributes(&attr); |
48 | 48 |
49 context_ = emscripten_webgl_create_context(canvas.c_str(), &attr); | 49 context_ = emscripten_webgl_create_context(canvas.c_str(), &attr); |
50 if (context_ < 0) | 50 if (context_ < 0) |
51 { | 51 { |
52 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, | 52 std::string message("Cannot create an OpenGL context for canvas: "); |
53 "Cannot create an OpenGL context for canvas: " + canvas); | 53 message += canvas; |
54 LOG(ERROR) << message; | |
55 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, message); | |
54 } | 56 } |
55 | 57 |
56 UpdateSize(); | 58 UpdateSize(); |
57 } | 59 } |
58 | 60 |