Mercurial > hg > orthanc-stone
comparison Framework/OpenGL/WebAssemblyOpenGLContext.cpp @ 958:769249e1f3b4
added guards to prevent calling methods on a dead controller (see comment in diff for expl.) + build fix
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 23 Aug 2019 10:16:32 +0200 |
parents | a7351ad54960 |
children | 92e32e263ae9 |
comparison
equal
deleted
inserted
replaced
957:966c96b694f6 | 958:769249e1f3b4 |
---|---|
69 return reinterpret_cast<void*>(context_); | 69 return reinterpret_cast<void*>(context_); |
70 } | 70 } |
71 | 71 |
72 bool IsContextLost() | 72 bool IsContextLost() |
73 { | 73 { |
74 LOG(TRACE) << "IsContextLost() for context " << std::hex() << | 74 LOG(TRACE) << "IsContextLost() for context " << std::hex << context_ << std::dec; |
75 bool apiFlag = (emscripten_is_webgl_context_lost(context_) != 0); | 75 bool apiFlag = (emscripten_is_webgl_context_lost(context_) != 0); |
76 isContextLost_ = apiFlag; | 76 isContextLost_ = apiFlag; |
77 return isContextLost_; | 77 return isContextLost_; |
78 } | 78 } |
79 | 79 |