preRender() and postRender(), how?
843799Aug 1 2001 — edited Aug 3 2001I need to add my own code before each frame is rendered (so that the lighting in my 'toon shader works properly), and i thought that over-riding the preRender method in canvas3D would be perfect for this. However, i'm miffed as to how to do this.
I've tried a quick test:
public class MyCanvas3D extends Canvas3D
{
preRender()
{
System.out.println("Pre-render");
}
}
which i would of thought would print a line before rendering each frame, but the compiler produces odd errors of "cannot resolve symbol" and something about canvas3d's constructors. Do i need to specify my own constructors? I don't need anything extra apart from custom pre(and possibly post)Render methods. Could anyone provide a breif bit of code that lets me define my own preRender method?
Thanks in advance.