[Ogre 2.1] Clone HLMS datablocks

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


User avatar
Jayray
Greenskin
Posts: 115
Joined: Sun Sep 09, 2012 5:29 pm
Location: Strasbourg, France
x 9

[Ogre 2.1] Clone HLMS datablocks

Post by Jayray »

Is there a function foreseen to clone HLMS datablocks, like the Material::clone() function?
In my case, it would be useful to retrieve the HLMS datablock from a font, duplicate it and use the copy for another movable object (MovableText) with different macro or blend parameters.

Thanks!
User avatar
Jayray
Greenskin
Posts: 115
Joined: Sun Sep 09, 2012 5:29 pm
Location: Strasbourg, France
x 9

Re: [Ogre 2.1] Clone HLMS datablocks

Post by Jayray »

I will try to implement this function by myself and make a pull request :)
It does not seem so difficult and I think Matias is busy enough right now :roll:
User avatar
Jayray
Greenskin
Posts: 115
Joined: Sun Sep 09, 2012 5:29 pm
Location: Strasbourg, France
x 9

Re: [Ogre 2.1] Clone HLMS datablocks

Post by Jayray »

Here is a first pull request: https://bitbucket.org/sinbad/ogre/pull- ... od-to/diff
As I said in the comments, it is not complete yet, but I would like to have an expert's opinion before going further :)
User avatar
Jayray
Greenskin
Posts: 115
Joined: Sun Sep 09, 2012 5:29 pm
Location: Strasbourg, France
x 9

Re: [Ogre 2.1] Clone HLMS datablocks

Post by Jayray »

Pull request updated for the PBS datablocks.
Works well for me, but I have not tested all the cases (multiple detail maps, etc.).