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

Method setViewSize

Wrappers/MyGUI_Export/MyGUI_ExportRenderManager.cpp:145–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 }
144
145 void ExportRenderManager::setViewSize(int _width, int _height)
146 {
147 if (_height == 0)
148 _height = 1;
149 if (_width == 0)
150 _width = 1;
151
152 mViewSize.set(_width, _height);
153
154 mInfo.maximumDepth = 0.0f;
155 mInfo.hOffset = -0.5f / float(mViewSize.width);
156 mInfo.vOffset = -0.5f / float(mViewSize.height);
157 mInfo.aspectCoef = float(mViewSize.height) / float(mViewSize.width);
158 mInfo.pixScaleX = 1.0f / float(mViewSize.width);
159 mInfo.pixScaleY = 1.0f / float(mViewSize.height);
160
161 onResizeView(mViewSize);
162
163 mUpdate = true;
164 }
165
166 void ExportRenderManager::destroyAllTextures()
167 {

Callers 2

_windowResizedMethod · 0.45

Calls 1

setMethod · 0.45

Tested by

no test coverage detected