Kerion
05-12-2008 08:03:49
I've got most of OGRE 1.6 updated with the proper header changes, and I've slowly started making the required Attributes.xml changes, but I've run in to a bit of a snag. In OGRE 1.6, the Renderable class has a new piece of functionality, a user defined Any. This is accessed using Renderable::setUserAny/RenderAble::getUserAny. Now, we don't support Any, so I need to set these methods to ignore in the Attributes.xml. Basically my Renderable definition looks as such:
This works, and IRenderable, Renderable and the Visitor proxy classes all generate, without any of the "UserAny" functions.
Now the issue is with classes that implement IRenderable, such as ShadowRenderable (by virtue of being a sub-class of Ogre::Renderable on the native side). It seems the class generator igores the Ignore attribute when generating interface implementation code. So even though Renderable and IRenderable do not contain the UserAny properties (as the native functions are set to be ignored), all the classes that implement IRenderable are still being generated with the UserAny property.
I am really not sure where to look in the AutoWrap code to fix this. I am sure it's a simple fix, simply adding an IsIgnored check somewhere, but after about four hours of stepping through the code tonight, I couldn't find it.
<class name="Renderable" WrapType="Interface">
<class name="Visitor" WrapType="NativeDirector" />
<class name="RenderSystemData" Ignore="" />
<function name="getRenderSystemData" Ignore="" />
<function name="setRenderSystemData" Ignore="" />
<function name="getUserAny" Ignore="" />
<function name="setUserAny" Ignore="" />
</class>
This works, and IRenderable, Renderable and the Visitor proxy classes all generate, without any of the "UserAny" functions.
Now the issue is with classes that implement IRenderable, such as ShadowRenderable (by virtue of being a sub-class of Ogre::Renderable on the native side). It seems the class generator igores the Ignore attribute when generating interface implementation code. So even though Renderable and IRenderable do not contain the UserAny properties (as the native functions are set to be ignored), all the classes that implement IRenderable are still being generated with the UserAny property.
I am really not sure where to look in the AutoWrap code to fix this. I am sure it's a simple fix, simply adding an IsIgnored check somewhere, but after about four hours of stepping through the code tonight, I couldn't find it.