Mercurial > hg > orthanc-stone
comparison Framework/OpenGL/WebAssemblyOpenGLContext.cpp @ 1050:d393ad9cf68c
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Oct 2019 14:31:56 +0200 |
parents | d6b83ee3a950 |
children | 0cc62db7e61b |
comparison
equal
deleted
inserted
replaced
1049:348866dd217c | 1050:d393ad9cf68c |
---|---|
121 void MakeCurrent() | 121 void MakeCurrent() |
122 { | 122 { |
123 if (IsContextLost()) | 123 if (IsContextLost()) |
124 { | 124 { |
125 LOG(ERROR) << "MakeCurrent() called on lost context " << context_; | 125 LOG(ERROR) << "MakeCurrent() called on lost context " << context_; |
126 throw OpenGLContextLostException(reinterpret_cast<void*>(context_)); | 126 throw StoneException(ErrorCode_WebGLContextLost); |
127 } | 127 } |
128 | 128 |
129 if (emscripten_is_webgl_context_lost(context_)) | 129 if (emscripten_is_webgl_context_lost(context_)) |
130 { | 130 { |
131 LOG(ERROR) << "OpenGL context has been lost for canvas: " << canvas_; | 131 LOG(ERROR) << "OpenGL context has been lost for canvas: " << canvas_; |
132 SetLostContext(); | 132 SetLostContext(); |
133 throw OpenGLContextLostException(reinterpret_cast<void*>(context_)); | 133 throw StoneException(ErrorCode_WebGLContextLost); |
134 } | 134 } |
135 | 135 |
136 if (emscripten_webgl_make_context_current(context_) != EMSCRIPTEN_RESULT_SUCCESS) | 136 if (emscripten_webgl_make_context_current(context_) != EMSCRIPTEN_RESULT_SUCCESS) |
137 { | 137 { |
138 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, | 138 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, |