Mercurial > hg > orthanc-stone
diff Framework/Scene2D/OpenGLCompositor.cpp @ 1246:3fe803f65c47 broker
proper initialization of opengl canvas size
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jan 2020 12:56:40 +0100 |
parents | d10d2acb8a02 |
children | 0ca50d275b9a |
line wrap: on
line diff
--- a/Framework/Scene2D/OpenGLCompositor.cpp Tue Jan 07 11:56:20 2020 +0100 +++ b/Framework/Scene2D/OpenGLCompositor.cpp Tue Jan 07 12:56:40 2020 +0100 @@ -137,6 +137,12 @@ canvasWidth_(0), canvasHeight_(0) { + if (!context_.IsContextLost()) + { + canvasWidth_ = context_.GetCanvasWidth(); + canvasHeight_ = context_.GetCanvasHeight(); + } + ResetScene(); }