本文整理汇总了C++中ogre::Root::_fireFrameRenderingQueued方法的典型用法代码示例。如果您正苦于以下问题:C++ Root::_fireFrameRenderingQueued方法的具体用法?C++ Root::_fireFrameRenderingQueued怎么用?C++ Root::_fireFrameRenderingQueued使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Root
的用法示例。
在下文中一共展示了Root::_fireFrameRenderingQueued方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: render
void Window::render()
{
Pipe *pipe = static_cast<Pipe *>(getPipe());
Ogre::Root *root = pipe->_ogre->getRoot();
root->_fireFrameStarted();
root->_fireFrameRenderingQueued();
mWindow->update(false);
root->_fireFrameEnded();
}
示例2: updateOGRE
void MainWindow::updateOGRE()
{
QMutexLocker locker(&mutex);
static bool updateGUI=true;
Ogre::Root* mRoot = Ogre::Root::getSingletonPtr();
mRoot->_fireFrameStarted();
// loop through ogre widgets and update animation
QList<OgreWidget*> rendlist = this->findChildren<OgreWidget*>();
foreach (OgreWidget* w, rendlist)
{
// update animation for OgreWidget's sceneManager
if (w->mRenderWindow && w->updatesEnabled())
{
// update OgreWidget
w->update();
//emit w->paintEvent(new QPaintEvent(w->rect()));
for (Ogre::SceneManager::MovableObjectIterator mit = w->getSceneManager()->getMovableObjectIterator("Entity");
mit.hasMoreElements(); mit.moveNext() )
{
Ogre::Entity *entity = static_cast<Ogre::Entity*>(mit.peekNextValue());
if (updateGUI) {
updateGUI = false;
}
// check has skeleton to avoid crash for non animable entities
if (entity->hasSkeleton())
{
for (Ogre::AnimationStateIterator animIt = entity->getAllAnimationStates()->getAnimationStateIterator();
animIt.hasMoreElements(); animIt.moveNext() )
{
Ogre::AnimationState *animState = animIt.peekNextValue();
if ( animState->getEnabled() )
{
//std::cout << entity->getName() << " ZZZZZZZZZZZ " << animState->getAnimationName();
animState->addTime(w->getRenderWindow()->getBestFPS()/10000);
}
}
}
}
}
}
mRoot->_fireFrameRenderingQueued();
mRoot->_fireFrameEnded();
}