| 166 | } |
| 167 | |
| 168 | void OgreRenderManager::renderQueueStarted( |
| 169 | Ogre::uint8 queueGroupId, |
| 170 | const Ogre::String& invocation, |
| 171 | bool& skipThisInvocation) |
| 172 | { |
| 173 | Gui* gui = Gui::getInstancePtr(); |
| 174 | if (gui == nullptr) |
| 175 | return; |
| 176 | |
| 177 | if (Ogre::RENDER_QUEUE_OVERLAY != queueGroupId) |
| 178 | return; |
| 179 | |
| 180 | Ogre::Viewport* viewport = mSceneManager->getCurrentViewport(); |
| 181 | if (nullptr == viewport || !viewport->getOverlaysEnabled()) |
| 182 | return; |
| 183 | |
| 184 | if (mWindow->getNumViewports() <= mActiveViewport || viewport != mWindow->getViewport(mActiveViewport)) |
| 185 | return; |
| 186 | |
| 187 | mCountBatch = 0; |
| 188 | |
| 189 | static Timer timer; |
| 190 | static unsigned long last_time = timer.getMilliseconds(); |
| 191 | unsigned long now_time = timer.getMilliseconds(); |
| 192 | unsigned long time = now_time - last_time; |
| 193 | |
| 194 | onFrameEvent(time / 1000.0f); |
| 195 | |
| 196 | last_time = now_time; |
| 197 | |
| 198 | begin(); |
| 199 | onRenderToTarget(this, mUpdate); |
| 200 | end(); |
| 201 | |
| 202 | // сбрасываем флаг |
| 203 | mUpdate = false; |
| 204 | } |
| 205 | |
| 206 | void OgreRenderManager::renderQueueEnded( |
| 207 | Ogre::uint8 queueGroupId, |
nothing calls this directly
no test coverage detected