Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Double Buffering with applet
#2
I'm not sure how this works exactly in Java, but I'll tell you the general method of double-buffering.

You create a texture the same size as the thing you want to buffer (in this case your screen) and then instead of drawing your objects directly to your screen, you draw them to your texture and then when you have finished you draw the whole texture to the screen in one go. Since drawing the whole texture is a single call, it should remove the flickering.

Generally in a game you will clear and re-draw the whole screen every update, it leads to less problems in the long run (such as alpha and Z-sort issues).
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply


Messages In This Thread
Double Buffering with applet - by 1337 - 12-11-2009, 08:45 PM
RE: Double Buffering with applet - by MrD. - 12-12-2009, 08:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Double Brace Initialization Project Evolution 0 669 10-10-2009, 01:41 PM
Last Post: Project Evolution

Forum Jump:


Users browsing this thread: 1 Guest(s)