Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebAssemblyViewport.cpp @ 1045:6a9300ecfa13
tests for context loss are now restricted to WebAssembly
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Oct 2019 17:17:56 +0200 |
parents | d6b83ee3a950 |
children | d393ad9cf68c |
comparison
equal
deleted
inserted
replaced
1044:b60d70e8b55c | 1045:6a9300ecfa13 |
---|---|
120 { | 120 { |
121 // something else nasty happened | 121 // something else nasty happened |
122 throw; | 122 throw; |
123 } | 123 } |
124 } | 124 } |
125 | |
126 bool WebAssemblyOpenGLViewport::IsContextLost() | |
127 { | |
128 return context_.IsContextLost(); | |
129 } | |
130 | 125 |
131 void WebAssemblyOpenGLViewport::RestoreCompositor() | 126 void WebAssemblyOpenGLViewport::RestoreCompositor() |
132 { | 127 { |
133 // the context must have been restored! | 128 // the context must have been restored! |
134 ORTHANC_ASSERT(!context_.IsContextLost()); | 129 ORTHANC_ASSERT(!context_.IsContextLost()); |
159 { | 154 { |
160 RestoreCompositor(); | 155 RestoreCompositor(); |
161 UpdateSize(); | 156 UpdateSize(); |
162 } | 157 } |
163 return false; | 158 return false; |
164 } | |
165 | |
166 void* WebAssemblyOpenGLViewport::DebugGetInternalContext() const | |
167 { | |
168 return context_.DebugGetInternalContext(); | |
169 } | 159 } |
170 | 160 |
171 void WebAssemblyOpenGLViewport::RegisterContextCallbacks() | 161 void WebAssemblyOpenGLViewport::RegisterContextCallbacks() |
172 { | 162 { |
173 #if 0 | 163 #if 0 |