I will create some kind of RenderCallback system to the RenderPass concept, which you can make use of.
Done. To use the RenderCallback do the following:
Implement RenderCallback in one of your classes:
public class FengGUIRenderer implements RenderCallback
{
public void beforeRenderPassIsRendered(OpenGLLayer openGLLayer, Object gl)
{
if (openGLLayer.isJOGL())
{
final GL myGL = (GL)gl;
// do whatever you want...
}
else if (openGLLayer.isLWJGL())
{
// access the global GL class
// do whatever you want...
}
}
}
I assume, you have a Xith3DEnvironment
// env is your Xith3DEnvironment
RenderPass rp = RenderPass.createParallel(); // check the other constructors / factory methods, too
rp.setRenderCallback( new FengGUIRenderer() );
env.addRenderPass( rp );
For any further questions, just ask...
Marvin