Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/OpenGLCompositor.cpp @ 890:77c96ba899f9
removing OpenGLCompositor::UpdateSize()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jul 2019 15:23:13 +0200 |
parents | 266e2b0b9abc |
children | 0aff28f15ea2 |
comparison
equal
deleted
inserted
replaced
888:6e888cf6a48b | 890:77c96ba899f9 |
---|---|
132 linesProgram_(context), | 132 linesProgram_(context), |
133 textProgram_(context), | 133 textProgram_(context), |
134 canvasWidth_(0), | 134 canvasWidth_(0), |
135 canvasHeight_(0) | 135 canvasHeight_(0) |
136 { | 136 { |
137 UpdateSize(); | |
138 } | 137 } |
139 | 138 |
140 | 139 |
141 OpenGLCompositor::~OpenGLCompositor() | 140 OpenGLCompositor::~OpenGLCompositor() |
142 { | 141 { |
146 delete it->second; | 145 delete it->second; |
147 } | 146 } |
148 } | 147 } |
149 | 148 |
150 | 149 |
151 void OpenGLCompositor::UpdateSize() | 150 void OpenGLCompositor::Refresh() |
152 { | 151 { |
153 canvasWidth_ = context_.GetCanvasWidth(); | 152 canvasWidth_ = context_.GetCanvasWidth(); |
154 canvasHeight_ = context_.GetCanvasHeight(); | 153 canvasHeight_ = context_.GetCanvasHeight(); |
155 | 154 |
156 context_.MakeCurrent(); | 155 context_.MakeCurrent(); |
156 | |
157 glViewport(0, 0, canvasWidth_, canvasHeight_); | 157 glViewport(0, 0, canvasWidth_, canvasHeight_); |
158 } | |
159 | |
160 | |
161 void OpenGLCompositor::Refresh() | |
162 { | |
163 context_.MakeCurrent(); | |
164 | |
165 glClearColor(0, 0, 0, 1); | 158 glClearColor(0, 0, 0, 1); |
166 glClear(GL_COLOR_BUFFER_BIT); | 159 glClear(GL_COLOR_BUFFER_BIT); |
167 | 160 |
168 helper_.Refresh(canvasWidth_, canvasHeight_); | 161 helper_.Refresh(canvasWidth_, canvasHeight_); |
169 | 162 |