本文整理汇总了C++中ogre::RenderWindow::removeAllViewports方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderWindow::removeAllViewports方法的具体用法?C++ RenderWindow::removeAllViewports怎么用?C++ RenderWindow::removeAllViewports使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::RenderWindow
的用法示例。
在下文中一共展示了RenderWindow::removeAllViewports方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: destroy
void BaseManager::destroy()
{
destroyScene();
destroyPointerManager();
destroyInput();
destroyGui();
// очищаем сцену
if (mSceneManager)
{
mSceneManager->clearScene();
mSceneManager->destroyAllCameras();
mSceneManager = nullptr;
mCamera = nullptr;
}
if (mWindow)
{
mWindow->destroy();
mWindow = nullptr;
}
if (mRoot)
{
Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
if (window)
window->removeAllViewports();
delete mRoot;
mRoot = nullptr;
}
}
示例2: destroyBasisManager
void BasisManager::destroyBasisManager() // очищаем все параметры каркаса приложения
{
destroyGui();
// очищаем сцену
if (mSceneMgr) {
mSceneMgr->clearScene();
mSceneMgr->destroyAllCameras();
mSceneMgr = 0;
}
destroyInput(); // удаляем ввод
if (mWindow) {
mWindow->destroy();
mWindow = 0;
}
if (mRoot) {
Ogre::RenderWindow * mWindow = mRoot->getAutoCreatedWindow();
if (mWindow) mWindow->removeAllViewports();
delete mRoot;
mRoot = 0;
}
}
示例3: destroyBasisManager
void BasisManager::destroyBasisManager() // очищаем все параметры каркаса приложения
{
// раскручиваем все стейты
while ( ! mStates.empty()) {
mStates.back()->exit();
mStates.pop_back();
}
if (mGUI) {
mGUI->shutdown();
delete mGUI;
mGUI = nullptr;
}
// очищаем сцену
if (mSceneMgr) {
mSceneMgr->clearScene();
mSceneMgr->destroyAllCameras();
mSceneMgr = 0;
}
// удаляем ввод
if (mInput) {
mInput->destroyInput();
delete mInput;
mInput = 0;
}
if (mWindow) {
mWindow->destroy();
mWindow = 0;
}
if (mRoot) {
Ogre::RenderWindow * mWindow = mRoot->getAutoCreatedWindow();
if (mWindow) mWindow->removeAllViewports();
delete mRoot;
mRoot = 0;
}
}
示例4: _SetActive
void BaseScene::_SetActive()
{
Ogre::RenderWindow* win = GameApplication::GetSingletonPtr()->GetWindow();
win->removeAllViewports();
mViewport = win->addViewport(mCamera);
mViewport->setBackgroundColour(m_BackgroundColor);
mCamera->setAspectRatio((float)mViewport->getActualWidth() / (float)mViewport->getActualHeight());
mKeyboard->setEventCallback(this);
mMouse->setEventCallback(this);
mRoot->addFrameListener(this);
if(!m_bSceneCreated)
{
CreateScene();
m_bSceneCreated = true;
}
SetActive();
}
示例5: shutdown
void BaseManager::shutdown()
{
mPreLuaScript.clear();
mPreLuaLocation.clear();
mPreLoad.clear();
destroyScene();
destroyPointerManager();
destroyInput();
destroyGui();
mSceneManager->destroyQuery( mSceneQuery );
mSceneQuery = nullptr;
destroySceneManager();
//清除内部帧监听器
//必须在destroyScene等后面被施放
delete mInputFilter;
mInputFilter = nullptr;
if (mRoot)
{
Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
if (window)
window->removeAllViewports();
OGRE_DELETE mRoot;
mRoot = nullptr;
}
if( mCoutSource ){
//删除mCoutSource,不要过早删除它。
delete mCoutSource;
mCoutSource = nullptr;
}
}
示例6: WinMain
//.........这里部分代码省略.........
// This is often use to change the general feeling of a whole scene.
Ogre::ColourValue lAmbientColour(0.1f, 0.7f, 0.3f, 0.3f);
lFirstPass->setAmbient(lAmbientColour);
// specular colour, is the colour of the 'little light reflection'
// that you can see on some object. For example, my bald head skin
// reflect the sun. This make a 'round of specular lighting'.
// Set this to black if you don't want to see it.
Ogre::ColourValue lSpecularColour(0.2f, 1.0f, 0.6f, 0.6f);
lFirstPass->setSpecular(lSpecularColour);
// Shininess is the 'inverse of specular color splattering' coefficient.
// If this is big (e.g : 64) you get a very tiny dot with a quite strong color (on round surface).
// If this is 0, you get a simple color layer (the dot has become very wide).
Ogre::Real lShininess = 34.0f;
lFirstPass->setShininess(lShininess);
}
//end material tests
//System Creator
std::string systemDefinition[10] = {"15000,0,0,false,false,false,700000,0", "300,0,0,false,false,barren,2500,1",
"300,x,y,false,co2,barren,6000,2", "300,x,y,h2o,n2/o2,gaia,6300,3", "300,x,y,false,co2,mars,3400,4",
"300,x,y,false,h2/he,gasgiant,71000,5", "300,x,y,false,h2/he,gasgiant,60000,6", "300,x,y,false,h2/he,gasgiant,25001,7",
"300,x,y,false,h2/he,gasgiant,25000,8", "300,x,y,false,n-ice,ice,1100,9"};
StarSystem sol = StarSystem::StarSystem(sceneMgr, systemDefinition);
//Star Creator
/*
{
int x = 0;
int y = 0;
int kelvin = 15000;
CelestialBody newstar = CelestialBody::CelestialBody(kelvin, 100, systemNode, sceneMgr, x, y);
}
// Spectrum testing and multi star generation.
int time = 200;
int x = -500;
int y = 500;
for ( int count = 1; count <= time; count++){
int kelvin = count * (40000/time);
Star newstar = Star::Star(kelvin, 100, systemNode, sceneMgr, x, y);
x += 20;
if (count % 10 == 0) {
y -= 20;
x = -500;
}
}
*/
// I move the SceneNode back 15 so that it is visible to the camera.
float PositionOffset = 0.0;
float distance = -2000.0;
systemNode->translate(0, PositionOffset, distance);
camera->lookAt(Ogre::Vector3(0,0,distance));
while (sim->getCurrentState() != SHUTDOWN) {
sol.rotateOrbits();
handler->capture();
ogre->renderOneFrame();
// run the message pump (uncomment for Eihort)
Ogre::WindowEventUtilities::messagePump();
}
{
window->removeAllViewports();
}
{
sceneMgr->destroyAllCameras();
sceneMgr->destroyAllManualObjects();
sceneMgr->destroyAllEntities();
sceneMgr->destroyAllLights();
systemNode->removeAndDestroyAllChildren();
}
{
Ogre::ResourceGroupManager& lRgMgr = Ogre::ResourceGroupManager::getSingleton();
lRgMgr.destroyResourceGroup(lNameOfResourceGroup);
}
// clean up after ourselves
delete pDlg;
delete handler;
delete sim;
delete ogre;
return 0;
}