本文整理汇总了C++中ogre::Root类的典型用法代码示例。如果您正苦于以下问题:C++ Root类的具体用法?C++ Root怎么用?C++ Root使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Root类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv)
{
try {
Ogre::Root *root = new Ogre::Root();
if(!root->restoreConfig() && !root->showConfigDialog())
return -1;
root->initialise(false);
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./data", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
Gtk::Main kit(argc, argv);
MainWindow window;
window.show();
while(!window.hasExited()) {
//root->renderOneFrame();
kit.iteration();
}
} catch( Ogre::Exception& e) {
std::cerr << "Caught unhandled Ogre exception: " << e.getFullDescription() << std::endl;
}
// delete root;
return 0;
}
开发者ID:tomkcook,项目名称:ringer,代码行数:27,代码来源:main.cpp
示例2: initialise
void initialise(Ogre::RenderWindow* _window, Ogre::SceneManager* _scene)
{
MYGUI_PLATFORM_ASSERT(!mIsInitialise, getClassTypeName() << " initialised twice");
MYGUI_PLATFORM_LOG(Info, "* Initialise: " << getClassTypeName());
mColorBlendMode.blendType = Ogre::LBT_COLOUR;
mColorBlendMode.source1 = Ogre::LBS_TEXTURE;
mColorBlendMode.source2 = Ogre::LBS_DIFFUSE;
mColorBlendMode.operation = Ogre::LBX_MODULATE;
mAlphaBlendMode.blendType = Ogre::LBT_ALPHA;
mAlphaBlendMode.source1 = Ogre::LBS_TEXTURE;
mAlphaBlendMode.source2 = Ogre::LBS_DIFFUSE;
mAlphaBlendMode.operation = Ogre::LBX_MODULATE;
mTextureAddressMode.u = Ogre::TextureUnitState::TAM_CLAMP;
mTextureAddressMode.v = Ogre::TextureUnitState::TAM_CLAMP;
mTextureAddressMode.w = Ogre::TextureUnitState::TAM_CLAMP;
mSceneManager = nullptr;
mWindow = nullptr;
mUpdate = false;
mRenderSystem = nullptr;
mActiveViewport = 0;
Ogre::Root* root = Ogre::Root::getSingletonPtr();
if (root != nullptr)
setRenderSystem(root->getRenderSystem());
setRenderWindow(_window);
setSceneManager(_scene);
MYGUI_PLATFORM_LOG(Info, getClassTypeName() << " successfully initialized");
mIsInitialise = true;
}
开发者ID:Allxere,项目名称:openmw,代码行数:35,代码来源:manager.cpp
示例3: float
OgreRTTexture::OgreRTTexture(Ogre::TexturePtr _texture) :
mViewport(nullptr),
mSaveViewport(nullptr),
mTexture(_texture)
{
mProjectMatrix = Ogre::Matrix4::IDENTITY;
Ogre::Root* root = Ogre::Root::getSingletonPtr();
if (root != nullptr)
{
Ogre::RenderSystem* system = root->getRenderSystem();
if (system != nullptr)
{
size_t width = mTexture->getWidth();
size_t height = mTexture->getHeight();
mRenderTargetInfo.maximumDepth = system->getMaximumDepthInputValue();
mRenderTargetInfo.hOffset = system->getHorizontalTexelOffset() / float(width);
mRenderTargetInfo.vOffset = system->getVerticalTexelOffset() / float(height);
mRenderTargetInfo.aspectCoef = float(height) / float(width);
mRenderTargetInfo.pixScaleX = 1.0f / float(width);
mRenderTargetInfo.pixScaleY = 1.0f / float(height);
}
if (mTexture->getBuffer()->getRenderTarget()->requiresTextureFlipping())
{
mProjectMatrix[1][0] = -mProjectMatrix[1][0];
mProjectMatrix[1][1] = -mProjectMatrix[1][1];
mProjectMatrix[1][2] = -mProjectMatrix[1][2];
mProjectMatrix[1][3] = -mProjectMatrix[1][3];
}
}
}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:32,代码来源:MyGUI_OgreRTTexture.cpp
示例4: debugDrawClassification
void NavigationCell::debugDrawClassification( Ogre::Vector3 start, Ogre::Vector3 end )
{
Ogre::Root *root = Ogre::Root::getSingletonPtr();
Ogre::SceneManager* mgr = root->getSceneManager( "SceneManagerInstance" );
Ogre::ManualObject* debug;
Ogre::SceneNode* node;
if( mgr->hasManualObject( "debugDrawClassification" ) )
debug = mgr->getManualObject( "debugDrawClassification" );
else
{
debug = mgr->createManualObject( "debugDrawClassification" );
node = mgr->getRootSceneNode()->createChildSceneNode();
node->attachObject( debug );
node->translate( 0, 1, 0 );
debug->setQueryFlags( 0 );
debug->setRenderQueueGroup( Ogre::RENDER_QUEUE_OVERLAY );
}
debug->begin( "debug/blue", Ogre::RenderOperation::OT_LINE_LIST );
debug->position( start );
debug->position( end );
debug->end();
// debugDrawCell( debug, "debug/yellow", "debug/blue" );
}
开发者ID:chuanyunjian,项目名称:Game-Engine-Testbed,代码行数:26,代码来源:navigationmesh.cpp
示例5: testModelMountScaling
void ModelMountTestCase::testModelMountScaling()
{
Ogre::Root root;
Ogre::SceneManager* sceneManager = root.createSceneManager(Ogre::ST_GENERIC);
TestModel model(*sceneManager);
//First test with a straight forward case.
Ogre::SceneNode* node = sceneManager->getRootSceneNode()->createChildSceneNode();
//We get an error when it's destroyed. So we don't destroy it.
SceneNodeProvider* nodeProvider = new SceneNodeProvider(node, nullptr);
Model::ModelMount mount(model, nodeProvider);
scaleAndTestMount(model, mount, nodeProvider->getNode());
//Test with the parent node being scaled
node->setScale(Ogre::Vector3(3.0f, 0.2f, 200.0f));
Ogre::SceneNode* subNode = node->createChildSceneNode();
nodeProvider = new SceneNodeProvider(subNode, nullptr);
Model::ModelMount mount2(model, nodeProvider);
scaleAndTestMount(model, mount2, nodeProvider->getNode());
//Test with the parent node being scaled and rotated
node->setScale(Ogre::Vector3(3.0f, 0.2f, 200.0f));
node->yaw(Ogre::Degree(42));
node->pitch(Ogre::Degree(76));
node->roll(Ogre::Degree(98));
subNode = node->createChildSceneNode();
nodeProvider = new SceneNodeProvider(subNode, nullptr);
Model::ModelMount mount3(model, nodeProvider);
scaleAndTestMount(model, mount3, nodeProvider->getNode());
}
开发者ID:sajty,项目名称:ember,代码行数:31,代码来源:ModelMountTestCase.cpp
示例6: OnMouseMove
void COrbitViewView::OnMouseMove(UINT nFlags, CPoint point)
{
Ogre::Vector3 CameraMove(0.0, 0.0, 0.0);
CEngine * Engine = ((COrbitViewApp*)AfxGetApp())->m_Engine;
if (Engine == NULL)
return;
Ogre::Root *Root = Engine->GetRoot();
if (m_Camera == NULL)
return;
if (m_MouseNavigation)
{
if (m_Orbit)
{
Ogre::SceneNode* CameraNode = m_SceneManager->getSceneNode("CameraNode");
CameraMove[1] = m_MousePosition.y - point.y;
m_Camera->moveRelative(CameraMove);
CameraNode->yaw(Ogre::Radian(0.01 * (m_MousePosition.x - point.x)));
}
else
{
CameraMove[0] = -(m_MousePosition.x - point.x);
CameraMove[1] = m_MousePosition.y - point.y;
m_Camera->moveRelative(CameraMove);
}
m_MousePosition = point;
Root->renderOneFrame();
}
CView::OnMouseMove(nFlags, point);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:33,代码来源:OrbitViewView.cpp
示例7: startEngine
Ogre::Root* OgreEngine::startEngine()
{
m_resources_cfg = "resources.cfg";
activateOgreContext();
Ogre::Root *ogreRoot = new Ogre::Root;
Ogre::RenderSystem *renderSystem = ogreRoot->getRenderSystemByName("OpenGL Rendering Subsystem");
ogreRoot->setRenderSystem(renderSystem);
ogreRoot->initialise(false);
Ogre::NameValuePairList params;
params["externalGLControl"] = "true";
params["currentGLContext"] = "true";
//Finally create our window.
m_ogreWindow = ogreRoot->createRenderWindow("OgreWindow", 1, 1, false, ¶ms);
m_ogreWindow->setVisible(false);
m_ogreWindow->update(false);
doneOgreContext();
return ogreRoot;
}
开发者ID:Alexpux,项目名称:QmlOgre,代码行数:25,代码来源:ogreengine.cpp
示例8: OnMouseMove
void CUsingControllersView::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_MouseNavigation)
{
Ogre::Vector3 CameraMove(0.0, 0.0, 0.0);
CameraMove[0] = -(m_MousePosition.x - point.x);
CameraMove[1] = m_MousePosition.y - point.y;
CEngine * Engine = ((CUsingControllersApp*)AfxGetApp())->m_Engine;
if (Engine == NULL)
return;
Ogre::Root *Root = Engine->GetRoot();
if (m_Camera == NULL)
return;
Ogre::Vector3 OldPosition = m_Camera->getPosition();
m_Camera->moveRelative(CameraMove);
m_MousePosition = point;
Root->renderOneFrame();
}
CView::OnMouseMove(nFlags, point);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:25,代码来源:UsingControllersView.cpp
示例9: startup
int startup(){
_root = new Ogre::Root("plugins_d.cfg");
if(!_root->showConfigDialog()){
return -1;
}
Ogre::RenderWindow* window = _root->initialise(true, "Ventana Ogre");
_sceneManager = _root->createSceneManager(Ogre::ST_GENERIC);
Ogre::Camera* camera = _sceneManager->createCamera("Camera");
camera->setPosition(Ogre::Vector3(500,100,500));
camera->lookAt(Ogre::Vector3(0,0,0));
camera->setNearClipDistance(5);
Ogre::Viewport* viewport = window->addViewport(camera);
viewport->setBackgroundColour(Ogre::ColourValue(0.0,0.0,0.0));
camera->setAspectRatio(Ogre::Real(viewport->getActualWidth()/viewport->getActualHeight()));
_listener = new FrameListenerProyectos(window,camera);
_root->addFrameListener(_listener);
loadResources();
createScene();
_root->startRendering();
return 0;
}
开发者ID:luiscarlo6,项目名称:Computacion-Grafica-USB,代码行数:28,代码来源:OgreSemana10.cpp
示例10: OnSysKeyDown
void CGeoImageView::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch (nChar)
{
case 'W':
m_Camera->setPolygonMode(Ogre::PM_WIREFRAME);
break;
case 'S':
m_Camera->setPolygonMode(Ogre::PM_SOLID);
break;
case 'P':
m_Camera->setPolygonMode(Ogre::PM_POINTS);
break;
}
Ogre::Root *Root = ((CGeoImageApp*)AfxGetApp())->m_Engine->GetRoot();
Root->renderOneFrame();
CView::OnSysKeyDown(nChar, nRepCnt, nFlags);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:28,代码来源:GeoImageView.cpp
示例11: OnTimer
void CUsingControllersView::OnTimer(UINT_PTR nIDEvent)
{
CEngine *Engine = ((CUsingControllersApp*)AfxGetApp())->m_Engine;
Ogre::Root *Root = Engine->GetRoot();
Root->renderOneFrame();
CView::OnTimer(nIDEvent);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:8,代码来源:UsingControllersView.cpp
示例12: initialise
void initialise(Ogre::RenderWindow* _window, Ogre::SceneManager* _scene)
{
MYGUI_PLATFORM_ASSERT(!mIsInitialise, getClassTypeName() << " initialised twice");
MYGUI_PLATFORM_LOG(Info, "* Initialise: " << getClassTypeName());
mColorBlendMode.blendType = Ogre::LBT_COLOUR;
mColorBlendMode.source1 = Ogre::LBS_TEXTURE;
mColorBlendMode.source2 = Ogre::LBS_DIFFUSE;
mColorBlendMode.operation = Ogre::LBX_MODULATE;
mAlphaBlendMode.blendType = Ogre::LBT_ALPHA;
mAlphaBlendMode.source1 = Ogre::LBS_TEXTURE;
mAlphaBlendMode.source2 = Ogre::LBS_DIFFUSE;
mAlphaBlendMode.operation = Ogre::LBX_MODULATE;
mTextureAddressMode.u = Ogre::TextureUnitState::TAM_CLAMP;
mTextureAddressMode.v = Ogre::TextureUnitState::TAM_CLAMP;
mTextureAddressMode.w = Ogre::TextureUnitState::TAM_CLAMP;
mSceneManager = nullptr;
mWindow = nullptr;
mUpdate = false;
mRenderSystem = nullptr;
mActiveViewport = 0;
Ogre::Root* root = Ogre::Root::getSingletonPtr();
if (root != nullptr)
setRenderSystem(root->getRenderSystem());
setRenderWindow(_window);
setSceneManager(_scene);
// ADDED
sh::MaterialInstance* mat = sh::Factory::getInstance().getMaterialInstance("MyGUI/NoTexture");
sh::Factory::getInstance()._ensureMaterial("MyGUI/NoTexture", "Default");
mVertexProgramNoTexture = static_cast<sh::OgreMaterial*>(mat->getMaterial())->getOgreTechniqueForConfiguration("Default")->getPass(0)
->getVertexProgram()->_getBindingDelegate();
mat = sh::Factory::getInstance().getMaterialInstance("MyGUI/OneTexture");
sh::Factory::getInstance()._ensureMaterial("MyGUI/OneTexture", "Default");
mVertexProgramOneTexture = static_cast<sh::OgreMaterial*>(mat->getMaterial())->getOgreTechniqueForConfiguration("Default")->getPass(0)
->getVertexProgram()->_getBindingDelegate();
mat = sh::Factory::getInstance().getMaterialInstance("MyGUI/NoTexture");
sh::Factory::getInstance()._ensureMaterial("MyGUI/NoTexture", "Default");
mFragmentProgramNoTexture = static_cast<sh::OgreMaterial*>(mat->getMaterial())->getOgreTechniqueForConfiguration("Default")->getPass(0)
->getFragmentProgram()->_getBindingDelegate();
mat = sh::Factory::getInstance().getMaterialInstance("MyGUI/OneTexture");
sh::Factory::getInstance()._ensureMaterial("MyGUI/OneTexture", "Default");
mFragmentProgramOneTexture = static_cast<sh::OgreMaterial*>(mat->getMaterial())->getOgreTechniqueForConfiguration("Default")->getPass(0)
->getFragmentProgram()->_getBindingDelegate();
MYGUI_PLATFORM_LOG(Info, getClassTypeName() << " successfully initialized");
mIsInitialise = true;
}
开发者ID:jhooks1,项目名称:openmw,代码行数:57,代码来源:manager.cpp
示例13: 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();
}
开发者ID:fingerx,项目名称:eqOgre,代码行数:9,代码来源:window.cpp
示例14: run
void ClientApplication::run()
{
Ogre::Root* root = mGraphicsManager->getRoot();
Ogre::RenderWindow* window = mGraphicsManager->getWindow();
root->getRenderSystem()->_initRenderTargets();
root->clearEventTimes();
boost::timer timer;
while( !mShutdown )
{
if( mShutdownRequested )
{
mStateMachine->popTo( 0 );
mShutdown = true;
}
const Real elapsed = timer.elapsed();
timer.restart();
mEarlyUpdateSignal();
mEarlyFrameSignal( elapsed );
mUpdateSignal();
mFrameSignal( elapsed );
mLateUpdateSignal();
mLateFrameSignal( elapsed );
Ogre::WindowEventUtilities::messagePump();
// Render even when the window is inactive.
if( window->isActive() )
{
root->renderOneFrame();
}
else if( window->isVisible() )
{
root->renderOneFrame();
window->update();
#if DIVERSIA_PLATFORM == DIVERSIA_PLATFORM_WIN32
Sleep( ( 1.0 / 60.0 ) * 1000.0 );
#else
usleep( ( 1.0 / 60.0 ) * 1000000.0 );
#endif
}
else if( !window->isActive() && !window->isVisible() )
{
#if DIVERSIA_PLATFORM == DIVERSIA_PLATFORM_WIN32
Sleep( ( 1.0 / 60.0 ) * 1000.0 );
#else
usleep( ( 1.0 / 60.0 ) * 1000000.0 );
#endif
}
}
}
开发者ID:Gohla,项目名称:Diversia,代码行数:56,代码来源:ClientApplication.cpp
示例15: OnActionsReset
void CManualObjectView::OnActionsReset()
{
for (int Index = 0; Index < m_ManualObject->getNumSections(); Index++)
{
m_ManualObject->setMaterialName(Index, Materials[Index]);
}
Ogre::Root *Root = ((CManualObjectApp*)AfxGetApp())->m_Engine->GetRoot();
Root->renderOneFrame();
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:10,代码来源:ManualObjectView.cpp
示例16: OnTimer
void COrbitViewView::OnTimer(UINT_PTR nIDEvent)
{
m_WalkAnimation->addTime(0.001);
CEngine *Engine = ((COrbitViewApp*)AfxGetApp())->m_Engine;
Ogre::Root *Root = Engine->GetRoot();
Root->renderOneFrame();
CView::OnTimer(nIDEvent);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:10,代码来源:OrbitViewView.cpp
示例17: OnTimer
void CLinkedAnimationView::OnTimer(UINT_PTR nIDEvent)
{
CEngine *Engine = ((CLinkedAnimationApp*)AfxGetApp())->m_Engine;
Ogre::Root *Root = Engine->GetRoot();
m_AnimationState1->addTime(0.01);
m_AnimationState2->addTime(0.01);
Root->renderOneFrame();
CView::OnTimer(nIDEvent);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:11,代码来源:LinkedAnimationView.cpp
示例18: EventListener
MapPresenter::MapPresenter(ViewPtr view)
: view_(view),
camera_man_(0),
scene_(0),
event_listener_(new EventListener(this))
{
//add frame listener
OgreContext* pOgreContext = WorkspaceRoot::instance()->ogreContext();
Ogre::Root* root = pOgreContext->root();
root->addFrameListener(event_listener_);
}
开发者ID:sandsc,项目名称:OgreQtRendering,代码行数:11,代码来源:MapPresenter.cpp
示例19: OnTimer
void CBlendingAnimationsView::OnTimer(UINT_PTR nIDEvent)
{
CEngine *Engine = ((CBlendingAnimationsApp*)AfxGetApp())->m_Engine;
Ogre::Root *Root = Engine->GetRoot();
Ogre::SceneNode *RobotNode = Root->getSceneManager("Walking")->getSceneNode("Robot");
Ogre::Entity *RobotEntity = Root->getSceneManager("Walking")->getEntity("Robot");
Ogre::Skeleton *Skeleton = RobotEntity->getSkeleton();
if (m_WeightDlg->m_IsAverage)
{
Skeleton->setBlendMode(Ogre::SkeletonAnimationBlendMode::ANIMBLEND_AVERAGE);
}
else
{
Skeleton->setBlendMode(Ogre::SkeletonAnimationBlendMode::ANIMBLEND_CUMULATIVE);
}
double WalkWeight;
double SlumpWeight;
switch(nIDEvent)
{
case 1:
WalkWeight = m_WeightDlg->m_WalkWeight.GetPos() / 10.0;
SlumpWeight = m_WeightDlg->m_SlumpWeight.GetPos() / 10.0;
m_WalkAnimation->setWeight(WalkWeight);
m_SlumpAnimation->setWeight(SlumpWeight);
m_WalkAnimation->addTime(0.01);
m_SlumpAnimation->addTime(0.01);
break;
case 2:
m_WalkAnimation->addTime(0.01);
break;
case 3:
m_SlumpAnimation->addTime(0.01);
break;
}
Root->renderOneFrame();
CView::OnTimer(nIDEvent);
}
开发者ID:southerlies,项目名称:OGRE-3D-1.7-Application-Development-Cookbook-Code,代码行数:52,代码来源:BlendingAnimationsView.cpp
示例20: RefreshOgreProfilingWindow
void TimeProfilerWindow::RefreshOgreProfilingWindow()
{
if (!tab_widget_ || tab_widget_->currentIndex() != 2)
return;
Ogre::Root *root = Ogre::Root::getSingletonPtr();
assert(root);
/*
Ogre::CompositorManager
Ogre::TextureManager
Ogre::MeshManager
Ogre::MaterialManager
Ogre::SkeletonManager
Ogre::HighLevelGpuProgramManager
Ogre::FontManager
*/
/*
Ogre::ControllerManager
Ogre::DefaultHardwareBufferManager
Ogre::GpuProgramManager
Ogre::OverlayManager
Ogre::ParticleSystemManager
*/
// Ogre::SceneManagerEnumerator::SceneManagerIterator iter = root->getSceneManagerIterator();
findChild<QLabel*>("labelNumSceneManagers")->setText(QString("%1").arg(CountSize(root->getSceneManagerIterator())));
findChild<QLabel*>("labelNumArchives")->setText(QString("%1").arg(CountSize(Ogre::ArchiveManager::getSingleton().getArchiveIterator())));
findChild<QLabel*>("labelTextureManager")->setText(ReadOgreManagerStatus(Ogre::TextureManager::getSingleton()).c_str());
findChild<QLabel*>("labelMeshManager")->setText(ReadOgreManagerStatus(Ogre::MeshManager::getSingleton()).c_str());
findChild<QLabel*>("labelMaterialManager")->setText(ReadOgreManagerStatus(Ogre::MaterialManager::getSingleton()).c_str());
findChild<QLabel*>("labelSkeletonManager")->setText(ReadOgreManagerStatus(Ogre::SkeletonManager::getSingleton()).c_str());
findChild<QLabel*>("labelCompositorManager")->setText(ReadOgreManagerStatus(Ogre::CompositorManager::getSingleton()).c_str());
findChild<QLabel*>("labelGPUProgramManager")->setText(ReadOgreManagerStatus(Ogre::HighLevelGpuProgramManager::getSingleton()).c_str());
findChild<QLabel*>("labelFontManager")->setText(ReadOgreManagerStatus(Ogre::FontManager::getSingleton()).c_str());
Ogre::SceneManager *scene = root->getSceneManagerIterator().getNext();
if (scene)
{
findChild<QLabel*>("labelCameras")->setText(QString("%1").arg(CountSize(scene->getCameraIterator())));
findChild<QLabel*>("labelAnimations")->setText(QString("%1").arg(CountSize(scene->getAnimationIterator())));
findChild<QLabel*>("labelAnimationStates")->setText(QString("%1").arg(CountSize(scene->getAnimationStateIterator())));
findChild<QLabel*>("labelLights")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::LightFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelEntities")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::EntityFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelBillboardSets")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::BillboardSetFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelManualObjects")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::ManualObjectFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelBillboardChains")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::BillboardChainFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelRibbonTrails")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::RibbonTrailFactory::FACTORY_TYPE_NAME))));
findChild<QLabel*>("labelParticleSystems")->setText(QString("%1").arg(CountSize(scene->getMovableObjectIterator(Ogre::ParticleSystemFactory::FACTORY_TYPE_NAME))));
}
QTimer::singleShot(500, this, SLOT(RefreshOgreProfilingWindow()));
}
开发者ID:Belsepubi,项目名称:naali,代码行数:52,代码来源:TimeProfilerWindow.cpp
注:本文中的ogre::Root类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论