Ogre Version: 1.12
Operating System: Windows and Linux
Render System: OpenGL mainly
Hi, I'm currently trying to modernize an old software project of mine called Skyscraper, and currently have it running on Ogre 1.12. I'm trying to see if I can use the DirectX11 (on windows) and OpenGL3+ renderers, but I'm having some trouble figuring out how to enable the RTSS support. I also wanted to see if I could eventually enable per-pixel lighting.
When trying to use OpenGL3, the app dies with
"RenderSystem does not support FixedFunction, but technique of 'data/menu.png' has no Vertex Shader. Use the RTSS or write custom shaders."
In my code, I added some basic initialization:
Code: Select all
//Enable the RT Shader System
Ogre::RTShader::ShaderGenerator::initialize();
Ogre::RTShader::ShaderGenerator* shaderGenerator = Ogre::RTShader::ShaderGenerator::getSingletonPtr();
shaderGenerator->addSceneManager(mSceneMgr);
//set up default material shader scheme
mViewport->setMaterialScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);
I'm assuming that I have to create a listener in order for RTSS to work with the materials (I tried some code I found on the forum here, but it didn't compile correctly due to some issues), but since most of my materials are manually created, is there a way to make a material RTSS-enabled via code?
If you want to see the raw code file for the app frontend, here it is on GitHub:
https://github.com/eventhorizon5/skyscr ... craper.cpp