LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: renanse on August 10, 2008, 16:12:58

Title: detecting a gl awt canvas is dirty
Post by: renanse on August 10, 2008, 16:12:58
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?
Title: Re: detecting a gl awt canvas is dirty
Post by: renanse on August 10, 2008, 16:16:14
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.
Title: Re: detecting a gl awt canvas is dirty
Post by: princec on August 10, 2008, 16:59:50
How about looking into fiddling with the RepaintManager?

Cas :)