How do I clone a datablock?

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


Post Reply
Hotshot5000
OGRE Contributor
OGRE Contributor
Posts: 226
Joined: Thu Oct 14, 2010 12:30 pm
x 56

How do I clone a datablock?

Post by Hotshot5000 »

I want to get tiled animations to work (viewtopic.php?f=25&t=91517) for multiple billboard sets and for that I need to clone the datablock that I am using since each of my billboards is going to have its own animation matrix. I see here https://bitbucket.org/sinbad/ogre/pull- ... od-to/diff and an implementation for this but it looks like it never got into the main branch. Is there anything like a datablock->clone()?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: How do I clone a datablock?

Post by dark_sylinc »

Take a look at this PR.

It is much newer, and relies on a more graceful approach: use LLVM to analyze the source code and automatically generate the cloning method using a Python script.
This saves us the trouble of manually maintaining cloning routines, which is the main reason that other PR you posted hasn't yet been integrated to main branch.

This LLVM method hasn't been integrated yet, because aside from being very new, I need to review and make a few minor tweaks; but other than that it is a much more preferred method.
Hotshot5000
OGRE Contributor
OGRE Contributor
Posts: 226
Joined: Thu Oct 14, 2010 12:30 pm
x 56

Re: How do I clone a datablock?

Post by Hotshot5000 »

I forgot to add the results: it's working! I now have tiled animation on unlit datablocks weeee! Thanks very much! Tested the code generation on Windows. Can't say anything about Linux.
Post Reply