Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/OpenGLCompositor.cpp @ 1327:4f8db2d202c8 broker
OrthancSeriesProgressiveLoader now has two modes that
can be selected at object creation :
- progressive (will first load jpeg50, then jpeg90 then PAM)
- non-progressive (will directly load PAM (uncompressed))
Please note that the slice loading order remains dynamic
and depending upon the slice that the client code wishes
to extract from the volume.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 25 Mar 2020 14:34:27 +0100 |
parents | 257f2c9a02ac |
children | 28c64c246312 |
comparison
equal
deleted
inserted
replaced
1326:55166e57a77c | 1327:4f8db2d202c8 |
---|---|
11 * | 11 * |
12 * This program is distributed in the hope that it will be useful, but | 12 * This program is distributed in the hope that it will be useful, but |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Affero General Public License for more details. | 15 * Affero General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Affero General Public License | 17 * You should have received a copy of the GNU Affero General Public License |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #include "OpenGLCompositor.h" | 21 #include "OpenGLCompositor.h" |
148 | 148 |
149 OpenGLCompositor::~OpenGLCompositor() | 149 OpenGLCompositor::~OpenGLCompositor() |
150 { | 150 { |
151 if (!context_.IsContextLost()) | 151 if (!context_.IsContextLost()) |
152 { | 152 { |
153 context_.MakeCurrent(); // this can throw if context lost! | 153 try |
154 for (Fonts::iterator it = fonts_.begin(); it != fonts_.end(); ++it) | 154 { |
155 { | 155 try |
156 assert(it->second != NULL); | 156 { |
157 delete it->second; | 157 context_.MakeCurrent(); // this can throw if context lost! |
158 } | |
159 catch (...) | |
160 { | |
161 LOG(ERROR) << "context_.MakeCurrent() failed in OpenGLCompositor::~OpenGLCompositor()!"; | |
162 } | |
163 | |
164 for (Fonts::iterator it = fonts_.begin(); it != fonts_.end(); ++it) | |
165 { | |
166 try | |
167 { | |
168 | |
169 assert(it->second != NULL); | |
170 delete it->second; | |
171 } | |
172 catch (...) | |
173 { | |
174 LOG(ERROR) << "Exception thrown while deleting OpenGL-based font!"; | |
175 } | |
176 } | |
177 } | |
178 catch (...) | |
179 { | |
180 // logging threw an exception! | |
158 } | 181 } |
159 } | 182 } |
160 } | 183 } |
161 | 184 |
162 void OpenGLCompositor::Refresh(const Scene2D& scene) | 185 void OpenGLCompositor::Refresh(const Scene2D& scene) |