Page 1 of 1

createSceneManager() using NULL Rendering System?

Posted: Sun Aug 12, 2018 4:08 pm
by mrmclovin

I'm trying make my classes that depend on Ogre testable and to do it I need Ogre not to render anything. I'm using Ogre 2.1 on macOS.

Code: Select all

Ogre::NULLPlugin ogre_null_plugin;
  Ogre::Root       ogre_root;


  Ogre::RenderSystem *rs = ogre_root.getRenderSystemByName("NULL Rendering Subsystem");


  Ogre::SceneManager *ogre_scene_mgr = ogre_root.createSceneManager(1, 1, Ogre::INSTANCING_CULLING_SINGLETHREAD);
This results in an assertion error when executing createSceneManager():
Assertion failed: (index < mTechniques.size() && "Index out of bounds."), function getTechnique, file /ogre/ogre/OgreMain/src/OgreMaterial.cpp, line 277.
Any idea what I need to do?

Re: createSceneManager() using NULL Rendering System?

Posted: Thu Nov 15, 2018 5:25 pm
by mrmclovin
Simple fix. I had to let ogre create a render window automatically using:

Code: Select all

Otherwise the MaterialManager would not setup default material technique and pass.