I need help with my double buffering update procedure... I use this:
public void update(Graphics g)
offScreenBuffer = null;
if (offScreenBuffer==null ||
(! (offScreenBuffer.getWidth(this) == this.size().width
&& offScreenBuffer.getHeight(this) == this.size().height)))
offScreenBuffer = this.createImage(size().width, size().height);
gr = offScreenBuffer.getGraphics();
g.drawImage(offScreenBuffer, 0, 0, this);
But the gfx is doesn''t run smooth at all, and some CPUs even hang up when using this code... if anyone know a solution to my little prob (or even better: know a better way to use double buffering), please reply.
Help my out here guys!
"We paint the sky with blood tonight, setting free the damned to fight"