Page 1 of 1

OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Posted: Fri Jul 19, 2024 10:54 pm
by Lax

Hi @dark_sylinc ,

I would like to use a custom SceneManager and custom SceneNode, because I want to implement interpolation transform for the SceneNode.
I would like to implement transform methods from Ogre::Node like: setPosition(...), setOrientation(...) etc.

For that I need OGRE_FLEXIBILITY_LEVEL at least at 1, or 2.

But where can I put that define at best?

Best Regards
Lax


Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Posted: Sat Jul 20, 2024 2:01 am
by dark_sylinc

It's been a while since I've touched OGRE_FLEXIBILITY_LEVEL code; but please note that it is defined like this:

Code: Select all

#ifndef OGRE_FLEXIBILITY_LEVEL
#    define OGRE_FLEXIBILITY_LEVEL 0
#endif

Which means that you could tell the compiler to force-define OGRE_FLEXIBILITY_LEVEL to a different number (both when compiling OgreNext and your project) and it would just work.

However looking at this, I think it would make sense to add an entry to OgreBuildSettings.h.in so that the value gets set from CMake based on CMake settings.

Right now there isn't no such feature, so you can add it and submit a PR :wink:


Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Posted: Sat Jul 20, 2024 9:14 am
by Lax

ok thanks for the information.

I unfortunately have no idea, how Ogre does work behind the scenes with cmake.
I think you are faster setting the option.

Best Regards
Lax


Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Posted: Sat Jul 20, 2024 2:18 pm
by Lax

If I activate virtual_l2, I get an link error in the SceneManager.h:

Code: Select all

 virtual_l2 bool validatePassForRendering( const Pass *pass );

In the cpp there is no implementation for that. And I think never was, but since the Flexibiliy level was 0, this was just an empty function and made no struggle.

This function should be removed.