RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader Topic is solved

Problems building or running the engine, queries about how to use features etc.
niceprogrammer
Gnoblar
Posts: 21
Joined: Sat Nov 02, 2024 12:38 pm
x 2

RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by niceprogrammer »

Ogre Version: 14.3.4
Operating System: Windows 10
Render System: OpenGL ES 2.x Rendering Subsystem

Hi everyone,

I get this error when using Ogre::ShadowTechnique::SHADOWTYPE_STENCIL_ADDITIVE but other ShadowTechnique works just fine.

Code: Select all

terminate called after throwing an instance of 'Ogre::InvalidStateException'
  what():  InvalidStateException: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader. Use the RTSS or write custom shaders. in SceneManager::_setPass at D:\Projects\Ogre3D\ogre\OgreMain\src\OgreSceneManager.cpp (line 675)

Can anyone give me a clue on how to fix this?

I tried RenderSystem_GL and RenderSystem_GL3Plus but I get a different error.

Code: Select all

terminate called after throwing an instance of 'Ogre::Exception'
  what():  : The specified image file did not contain a resource section.
 in ConfigDialog::display

I am trying the codes from Ogre Tutorials: Lights, Cameras, and Shadows.

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 495
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 179

Re: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by sercero »

You will have to use the RTSS, because the Ninja model has a very basic material that only works with FFP.

The problem is this: the rendering systems you chose do not support what is called the FixedFunction Pipeline which is a rendering pipeline that does not use shaders and is extremely old. These rendering systems only accept materials with shaders, unlike DirectX9 or OpenGL1 which are a middle ground since they support the FFP but also can use shaders.

To acomodate this issue a system was devised by the OGRE team called RTSS (RealTime Shader System), this system creates the shaders for you on the fly for the rendering systems which require shaders.

The system is also useful in general to create materials without needing to know much about shaders.

But to be honest if you are going to use OGRE I would recommend learning a bit about shaders.

niceprogrammer
Gnoblar
Posts: 21
Joined: Sat Nov 02, 2024 12:38 pm
x 2

Re: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by niceprogrammer »

Thank you for the awesome response!

I am interested in learning Shaders but right now I am just trying to follow the Tutorials. I still have a long way to go.

I did have these.

Code: Select all

// register our scene with the RTSS
Ogre::RTShader::ShaderGenerator *shadergen = Ogre::RTShader::ShaderGenerator::getSingletonPtr();
shadergen->addSceneManager(scnMgr);
    
scnMgr->setAmbientLight(Ogre::ColourValue(0, 0, 0));
scnMgr->setShadowTechnique(Ogre::ShadowTechnique::SHADOWTYPE_STENCIL_ADDITIVE);
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 495
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 179

Re: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by sercero »

Well, thats strange.

It seems that you are using the RTSS, perhaps you are instancing the Entity before the RTSS? :?

Can you post the whole code?

And one thing you can try is to use DirectX9 or OpenGL1

niceprogrammer
Gnoblar
Posts: 21
Joined: Sat Nov 02, 2024 12:38 pm
x 2

Re: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by niceprogrammer »

There is no option in CMake GUI to build DX9 for some reason.

For now I re-tried Plugin=RenderSystem_GL and it seemed to work. I don't know why it did not work last time. Perhaps I did something wrong in plugin.cfg.

Image

I will continue using Plugin=RenderSystem_GL to get unblocked from the tutorials.

Thank you very much!

User avatar
Arthurfernandes
Kobold
Posts: 37
Joined: Mon Oct 28, 2024 10:50 pm
x 5

Re: RenderSystem does not support FixedFunction, but technique of 'Examples/Ninja' has no Vertex Shader

Post by Arthurfernandes »

niceprogrammer wrote: Mon Mar 10, 2025 6:05 pm

There is no option in CMake GUI to build DX9 for some reason.

For now I re-tried Plugin=RenderSystem_GL and it seemed to work. I don't know why it did not work last time. Perhaps I did something wrong in plugin.cfg.

Image

I will continue using Plugin=RenderSystem_GL to get unblocked from the tutorials.

Thank you very much!

Hey!

I had the same problem at some point in my Ogre journey. My solution was to download the Microsoft DirectX SDK (June 2010) for DX9, and in CMake GUI, you need to set the path like this:

Image

This solves my problem as far as I'm concerned. Hope that helps you.

P.S.: Take a look at the line with Render System 9 too.

Image