本文整理汇总了C++中SoundManager::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ SoundManager::Initialize方法的具体用法?C++ SoundManager::Initialize怎么用?C++ SoundManager::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoundManager
的用法示例。
在下文中一共展示了SoundManager::Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initExtra
bool Lagom::initExtra()
{
m_pViewport = m_pRenderWnd->addViewport(0);
m_pViewport->setBackgroundColour(ColourValue(0.0f, 0.0f, 0.0f, 1.0f));
//m_pViewport->setClearEveryFrame(false);
m_pViewport->setCamera(0);
LogMessage("Viewport Initialized");
if(!LagomInput::getSingletonPtr())
new LagomInput();
LagomInput::getSingletonPtr()->Initialize(m_pRenderWnd);
LogMessage("Input Initialized");
//initialize Resources
LogMessage("Adding resource locations");
#if defined( ANDROID )
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(_dataFile, "Android");
#elif !defined(_DEBUG)
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(_dataFile, "Zip");
#else
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/models", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/materials/scripts", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/materials/textures", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/gui", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/SSAO", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/music", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/sound", "FileSystem");
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("media/units", "FileSystem");
#endif
LogMessage("Lagom Resources Added");
Ogre::DataStreamPtr stream = Ogre::ResourceGroupManager::getSingleton().openResource("LargeFont.gorilla");
if(!stream.getPointer())
LogMessage("Expected Resource does not exist");
else
LogMessage("Expected Resource exists");
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps( MIP_UNLIMITED );
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
LogMessage("Resource Groups Initialized complete");
/*
#ifndef ANDROID // on android this is done from the JNI
Ogre::String secName, typeName, archName;
Ogre::ConfigFile cf;
cf.load(_dataFile);
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
}
}
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps( MIP_UNLIMITED );
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
LogMessage("Resources Initialized");
#endif*/
//m_pTrayMgr = new OgreBites::SdkTrayManager("AOFTrayMgr", m_pRenderWnd, m_pMouse, 0);
m_pTimer = new Ogre::Timer();
m_pTimer->reset();
LogMessage("Timer Initialized");
//init CEGUI
//CEGUI::ImagesetManager::getSingleton().createFromImageFile("LagomLogo","LagomLogo.png","General");
//CEGUI::Imageset &imageset = CEGUI::ImagesetManager::getSingleton().createFromImageFile((CEGUI::utf8 *)"tutorialSet", (CEGUI::utf8 *)"Tutorial.png",(CEGUI::utf8 *)"General");
//imageset.defineImage((CEGUI::utf8 *)"tutorialImage", CEGUI::Rect(0, 0, 800, 600), CEGUI::Vector2(0, 0));
// setup compositors
if (CompositorManager::getSingleton().addCompositor(m_pViewport, "SSAO/GBuffer"))
CompositorManager::getSingleton().setCompositorEnabled(m_pViewport, "SSAO/GBuffer", false);
else
LogManager::getSingleton().logMessage("SSAO: Failed to add GBuffer compositor \n");
LogMessage("Compositors Initialized");
/*
for (unsigned int i = 0; i < nCompositorNames; i++)
{
if (CompositorManager::getSingleton().addCompositor(m_pViewport, compositorNames[i]))
CompositorManager::getSingleton().setCompositorEnabled(m_pViewport, compositorNames[i], false);
else
LogManager::getSingleton().logMessage("SSAO: Failed to add compositor: " + compositorNames[i] + "\n");
//.........这里部分代码省略.........