detecting a gl awt canvas is dirty

Started by renanse, August 10, 2008, 16:12:58

Previous topic - Next topic

renanse

Hey folks.  I'm working on adding a feature to jME's canvas system that allows you to only repaint the canvas when it is considered "dirty".  The case I'm having issues with is when you drag another window, etc. across the canvas, causing the contents of your canvas to need repainting.  Normally I would override paint(Graphics) and use information there to determine that something is dirty, but paint is final in AWTGLCanvas.  Does anyone have any suggestions?

renanse

I should note that so far I've been able to solve this in our JOGL/AWT (overriding paint and just setting dirty to true before calling super) and LWJGL/SWT (adding a PaintListener) implementations, just not LWJGL/AWT.

princec

How about looking into fiddling with the RepaintManager?

Cas :)