Code: Select all
cameraNode = camera->getSceneManager()->getRootSceneNode()->createChildSceneNode();
if (!cameraNode)
std::cout << "This will print\n";
Code: Select all
cameraNode = camera->getSceneManager()->getRootSceneNode()->createChildSceneNode();
if (!cameraNode)
std::cout << "This will print\n";
Code: Select all
void GraphicsSystem::initialize(const Ogre::String &windowTitle)
{
// ...
root = OGRE_NEW Ogre::Root(pluginsPath, mWriteAccessFolder + "ogre.cfg",
mWriteAccessFolder + "Ogre.log" );
// ...
// I added the following section even though I use only GL3+ ...
staticPluginLoader.install(root);
Ogre::RenderSystemList::const_iterator itor =
root->getAvailableRenderers().begin();
Ogre::RenderSystemList::const_iterator itor_end =
root->getAvailableRenderers().begin();
if (itor == itor_end)
std::cout << "This always prints\n";
// ...
// and this line will crash it.
root->getRenderSystem()->setConfigOption("sRGB Gamma Conversion", "Yes");
// ...
}
Code: Select all
void GraphicsSystem::initialize(const Ogre::String &windowTitle) {
Ogre::String pluginsPath;
pluginsPath = mPluginsFolder + "../etc/plugins.cfg";
root = OGRE_NEW Ogre::Root(pluginsPath, mWriteAccessFolder + "ogre.cfg",
mWriteAccessFolder + "Ogre.log" );
root->getRenderSystem()->setConfigOption("sRGB Gamma Conversion","Yes");
Code: Select all
Ogre::RenderSystemList::const_iterator itor =
root->getAvailableRenderers().begin();
Ogre::RenderSystemList::const_iterator itor_end =
root->getAvailableRenderers().begin();
if (itor == itor_end)
std::cout << "this will print, so no renderers found even though GL3+ has loaded.\n";
while (itor != itor_end) {
// i don't quite get this loop as it seems to have no effect elsewhere.
Ogre::RenderSystem *rs = *itor;
rs->setConfigOption("sRGB Gamma Conversion", "Yes");
++itor;
}
Code: Select all
...
Loading library /opt/ogre-next/lib/OGRE/RenderSystem_GL3Plus
Installing plugin: GL 3+ RenderSystem
OpenGL 3+ Rendering Subsystem created.
Plugin successfully installed
...
Something I noticed.. shouldn't the latter be .end() ?Ogre::RenderSystemList::const_iterator itor =
root->getAvailableRenderers().begin();
Ogre::RenderSystemList::const_iterator itor_end =
root->getAvailableRenderers().begin();