本文整理汇总了C++中ogre::RenderWindow::getTriangleCount方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderWindow::getTriangleCount方法的具体用法?C++ RenderWindow::getTriangleCount怎么用?C++ RenderWindow::getTriangleCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::RenderWindow
的用法示例。
在下文中一共展示了RenderWindow::getTriangleCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: executeLocalScripts
bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
{
try
{
mEnvironment.setFrameDuration (evt.timeSinceLastFrame);
// update input
MWBase::Environment::get().getInputManager()->update();
// sound
if (mUseSound)
MWBase::Environment::get().getSoundManager()->update (evt.timeSinceLastFrame);
// global scripts
MWBase::Environment::get().getScriptManager()->getGlobalScripts().run();
bool changed = MWBase::Environment::get().getWorld()->hasCellChanged();
// local scripts
executeLocalScripts(); // This does not handle the case where a global script causes a cell
// change, followed by a cell change in a local script during the same
// frame.
// passing of time
if (MWBase::Environment::get().getWindowManager()->getMode()==MWGui::GM_Game)
MWBase::Environment::get().getWorld()->advanceTime (
mEnvironment.getFrameDuration()*MWBase::Environment::get().getWorld()->getTimeScaleFactor()/3600);
if (changed) // keep change flag for another frame, if cell changed happend in local script
MWBase::Environment::get().getWorld()->markCellAsUnchanged();
// update actors
std::vector<std::pair<std::string, Ogre::Vector3> > movement;
MWBase::Environment::get().getMechanicsManager()->update (movement, mEnvironment.getFrameDuration(),
MWBase::Environment::get().getWindowManager()->getMode()!=MWGui::GM_Game);
if (MWBase::Environment::get().getWindowManager()->getMode()==MWGui::GM_Game)
MWBase::Environment::get().getWorld()->doPhysics (movement, mEnvironment.getFrameDuration());
// update world
MWBase::Environment::get().getWorld()->update (evt.timeSinceLastFrame);
// update GUI
Ogre::RenderWindow* window = mOgre->getWindow();
MWBase::Environment::get().getWindowManager()->wmUpdateFps(window->getLastFPS(),
window->getTriangleCount(),
window->getBatchCount());
MWBase::Environment::get().getWindowManager()->onFrame(evt.timeSinceLastFrame);
}
catch (const std::exception& e)
{
std::cerr << "Error in framelistener: " << e.what() << std::endl;
}
return true;
}
示例2: executeLocalScripts
bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
{
try
{
mEnvironment.mFrameDuration = evt.timeSinceLastFrame;
// sound
if (mUseSound)
{
mEnvironment.mSoundManager->playPlaylist();
mEnvironment.mSoundManager->update (evt.timeSinceLastFrame);
}
// update GUI
Ogre::RenderWindow* window = mOgre->getWindow();
mEnvironment.mWindowManager->wmUpdateFps(window->getLastFPS(),
window->getTriangleCount(),
window->getBatchCount());
mEnvironment.mWindowManager->onFrame(mEnvironment.mFrameDuration);
// global scripts
mEnvironment.mGlobalScripts->run (mEnvironment);
bool changed = mEnvironment.mWorld->hasCellChanged();
// local scripts
executeLocalScripts(); // This does not handle the case where a global script causes a cell
// change, followed by a cell change in a local script during the same
// frame.
// passing of time
if (mEnvironment.mWindowManager->getMode()==MWGui::GM_Game)
mEnvironment.mWorld->advanceTime (
mEnvironment.mFrameDuration*mEnvironment.mWorld->getTimeScaleFactor()/3600);
if (changed) // keep change flag for another frame, if cell changed happend in local script
mEnvironment.mWorld->markCellAsUnchanged();
// update actors
std::vector<std::pair<std::string, Ogre::Vector3> > movement;
mEnvironment.mMechanicsManager->update (movement);
if (mEnvironment.mWindowManager->getMode()==MWGui::GM_Game)
mEnvironment.mWorld->doPhysics (movement, mEnvironment.mFrameDuration);
// update world
mEnvironment.mWorld->update (evt.timeSinceLastFrame);
// report focus object (for debugging)
if (mReportFocus)
updateFocusReport (mEnvironment.mFrameDuration);
}
catch (const std::exception& e)
{
std::cerr << "Error in framelistener: " << e.what() << std::endl;
}
return true;
}