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".

Reply via email to