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

Method doRender

MyGUIEngine/src/MyGUI_RotatingSkin.cpp:143–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 void RotatingSkin::doRender()
144 {
145 if (!mVisible || mEmptyView)
146 return;
147
148 Vertex* verticies = mRenderItem->getCurrentVertexBuffer();
149
150 float vertex_z = mNode->getNodeDepth();
151
152 if (mGeometryOutdated)
153 {
154 _rebuildGeometry();
155 mGeometryOutdated = false;
156 }
157
158 for (int i = 1; i < GEOMETRY_VERTICIES_TOTAL_COUNT - 1; ++i)
159 {
160 verticies[3 * i - 3].set(
161 mResultVerticiesPos[0].left,
162 mResultVerticiesPos[0].top,
163 vertex_z,
164 mResultVerticiesUV[0].left,
165 mResultVerticiesUV[0].top,
166 mCurrentColour);
167 verticies[3 * i - 2].set(
168 mResultVerticiesPos[i].left,
169 mResultVerticiesPos[i].top,
170 vertex_z,
171 mResultVerticiesUV[i].left,
172 mResultVerticiesUV[i].top,
173 mCurrentColour);
174 verticies[3 * i - 1].set(
175 mResultVerticiesPos[i + 1].left,
176 mResultVerticiesPos[i + 1].top,
177 vertex_z,
178 mResultVerticiesUV[i + 1].left,
179 mResultVerticiesUV[i + 1].top,
180 mCurrentColour);
181 }
182
183 mRenderItem->setLastVertexCount((GEOMETRY_VERTICIES_TOTAL_COUNT - 2) * 3);
184 }
185
186 void RotatingSkin::_setColour(const Colour& _value)
187 {

Callers

nothing calls this directly

Calls 4

setLastVertexCountMethod · 0.80
getNodeDepthMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected