OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Post 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

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Post 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:

Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Post 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

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: OGRE_FLEXIBILITY_LEVEL for Custom SceneManager and SceneNode

Post 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.

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62