Signature of IFigure3D.render(..) and other similar methods changed [message #561242] |
Mon, 13 April 2009 12:20 |
|
Hi all,
this posting is only interesting for you if you have used GEF3D before
April 12th and do an update (to revision 69 or newer):
as already mailed to the GEF3D developer mailing list, I have changed
the signature of IFigure3D.render(..).
(This was necessary due to a problem with Java singletons used by
plugins declared as plugin-singletons.)
This change affects all render and postrender methods, that is
IFigure3D.render()
IFigure3D.postrender()
and
TransparentObject.renderTransparent()
TransparentObject.getTransparencyDepth()
All these methods now have a parameter RenderContext. Before the
change, your code will probably have looked like this:
@Override
public void postrender() {
RenderContext renderContext = RenderContext.getContext();
...
}
Since RenderContext is no singleton anymore, the static method
RenderContext.getContext() has been removed. Instead, the render
context is passed as parameter, so you will have to change your code to:
@Override
public void postrender(RenderContext renderContext) {
...
}
It's pretty simple, isn't it ;-) If you need the render context outside
that method, you may call the newly introduced method
IFigure3D.getRenderContext(), but I do not recommend that, since we are
maybe going to remove that method. The render context is usually only
needed inside the render methods and then it is passed as parameter now.
I'm sorry for any inconvenience!
Cheers
Jens
|
|
|
Powered by
FUDForum. Page generated in 0.04887 seconds