Hi,
I know this is a question that has been dealt with on several forums
(perhaps including this one) but I still haven't found a working solution.
I'm interested in having a large window of main interaction containing
dynamic, mainly vector graphics; most advice seems to point to using a
back-buffer for hardware acceleration
(http://weblogs.java.net/blog/chet/archive/2004/08/toolkitbuffered.html),
using BufferStrategy.
Here's the skeleton code:
w = new Jframe();
BufferCaps = new BufferCapabilities(new ImageCapabilities(true),new
ImageCapabilities(true),BufferCapabilities.FlipContents.BACKGROUND);
strategy = w.createBufferStrategy(2, BufferCaps);
// Render loop
while (!done) {
Graphics g = strategy.getDrawGraphics();
g.dispose() // what does this do?
// Draw to graphics
...
strategy.show();
}
// Dispose the window
w.setVisible(false);
w.dispose();
The problem is that I'm still getting heavy tearing, even when using 4
buffers, doing the method appropriately, overriding the paint & update to
remove the clear screen calls, etc.
Has anyone else had similar problems or found a solution?
Thanks
OS 10.3.8, PowerBook G4 867, java.version = 1.4.2_05
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden