L
Lash Rambo
Is is possible to do away with the drawImage(offscreenImage) step of
double-buffering in Java?
Specifically, what I'm thinking of is two graphics contexts that can be
toggled between. One graphics context will be off-screen and drawn to,
while the other is on-screen and left alone. When the drawing is done and
it's time to present a new frame, simply swap the two graphics contexts's
references. In other words, the graphics context that was the off-screen
one becomes the on-screen one, and vice versa.
Is this possible, for instance, with java.applet.Applet? If so, it'd seem
to eliminate a lot of overhead, particularly for large scenes that need to
be completely redrawn each frame.
double-buffering in Java?
Specifically, what I'm thinking of is two graphics contexts that can be
toggled between. One graphics context will be off-screen and drawn to,
while the other is on-screen and left alone. When the drawing is done and
it's time to present a new frame, simply swap the two graphics contexts's
references. In other words, the graphics context that was the off-screen
one becomes the on-screen one, and vice versa.
Is this possible, for instance, with java.applet.Applet? If so, it'd seem
to eliminate a lot of overhead, particularly for large scenes that need to
be completely redrawn each frame.