Mercurial > hg > orthanc-stone
changeset 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 | 3d4dc87af04b |
children | af35ec39ebec |
files | Framework/Scene2D/OpenGLCompositor.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
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(); }