Well, there isn't any reason why it would have to do a lot of garbage
collection every time flush() is called (every frame!), but I tried it
anyway. No change. I am still confused as to why a very basic Graphics2D
operation would add 1/2 second on to my rendering time. Anyone else with an
idea, any Sun people out there?
Or, assuming there is no solution, has anyone found a good way to blit
directly to the back buffer, bypassing Graphics2D operations?
Thanks,
Garth Shoemaker
Electronic Arts Canada
-----Original Message-----
From: Malguy, Eric G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 18, 2000 7:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] J3DGraphics2D performance problems
Have you tried the gc()?
System.gc();
-----Original Message-----
From: Shoemaker, Garth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 17, 2000 9:01 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] J3DGraphics2D performance problems
Hi all,
I was overjoyed with the inclusion of 2D Graphics calls in 1.2, but the
performance (in my case at least) is atrocious. I'm sure I must be doing
SOMETHING wrong. Here is a code snippet...
class blah extends Canvas3D {
J3DGraphics2D graphics;
...
public void postRender() {
super.postRender();
graphics.fillRect(50, 50, 100, 100);
graphics.flush(false);
}
}
In the above code, the call to graphics.flush() takes about 500ms (as
opposed to <50ms for rendering without the call). It occurs whether or not I
pass false or true flush(), but ony if I actually do some drawing (eg.
fillRect or drawString). I tried setting my Graphics2D hints all to
"Fastest," but that did nothing. It happened with both Beta 2 and the new
release. Oh, this is on top of the fact that, according to my
interpretation, the flush call shouldn't be needed, as flush() should get
called automatically with the buffer swap (the Canvas3D is double buffered).
But, without the call to flush(), nothing gets drawn.
My setup: Win 98, PIII 600, TNT 16MB card, Java 1.3, Java3D 1.2, 2 Canvas3Ds
(each 655x300) in a JFrame.
Any help is appreciated, this is quite infuriating.
Thank you,
Garth Shoemaker
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".