Skip to Main Content

preRender() and postRender(), how?

843799Aug 1 2001 — edited Aug 3 2001
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Aug 31 2001
Added on Aug 1 2001
3 comments
149 views