MCPcopy Create free account
hub / github.com/MyGUI/mygui / setViewSize

Method setViewSize

Platforms/OpenGL/OpenGLPlatform/src/MyGUI_OpenGLRenderManager.cpp:197–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 }
196
197 void OpenGLRenderManager::setViewSize(int _width, int _height)
198 {
199 if (_height == 0)
200 _height = 1;
201 if (_width == 0)
202 _width = 1;
203
204 mViewSize.set(_width, _height);
205
206 mInfo.maximumDepth = 1;
207 mInfo.hOffset = 0;
208 mInfo.vOffset = 0;
209 mInfo.aspectCoef = float(mViewSize.height) / float(mViewSize.width);
210 mInfo.pixScaleX = 1.0f / float(mViewSize.width);
211 mInfo.pixScaleY = 1.0f / float(mViewSize.height);
212
213 glViewport(0, 0, _width, _height);
214
215 onResizeView(mViewSize);
216 mUpdate = true;
217 }
218
219 void OpenGLRenderManager::registerShader(
220 const std::string& _shaderName,

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected