Chris,
Is your image the same every frame (that is, would you be able to see any
superimposition)? Do you use a transparent/translucent background? I found
when using a translucent background that it would just keep adding on top until
I got a solid color.
I also found that you have to call flush(true) every time in postRender in order
to see the results. However, I want to show just what's been drawn during the
last frame. Not every draw command I ever issued. That's why I'm asking about
clearing the drawing buffer. I would have thought that would happen
automatically, so maybe it's a bug. Or maybe I don't understand the class well
enough yet. It'd be nice if they were better documented.
- Rob
"Williams, Christopher" wrote:
> Hmmm..I don't get the same results. I am also doing my drawing while in the
> postRender and I have to call my drawImage every time in order for it to
> stay on the screen constantly. I wish this was the case so I wouldn't have
> to do the draw everytime in the potRender call which slows down my display.
> Chris
>
> ----------
> From: Rob Bishop[SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 05, 2000 10:18 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Another Question about the J3DGraphics2D
> object...
>
> J3D Team,
>
> I'm having some difficulty getting the J3DGraphics2D object to draw
> properly.
> I'm able to get Strings and images drawn on the Canvas3D, but it
> appears that
> the J3DGraphics2D internal buffer is never cleared. So it winds up
> superimposing my new draws over all the old ones. For example, say
> in
> postRender() I:
>
> j3dg2d.drawString("A");
> j3dg2d.flush(true);
>
> and then next time through:
>
> j3dg2d.drawString("B");
> j3dg2d.flush(true);
>
> B will be superimposed over A.
>
> Is there a way to clear J3DGraphics2D drawing buffer???? (Note that
> this is
> different from clearing the Canvas3D to the background color which
> happens every
> frame anyway).
>
> Is this a bug or am I doing something wrong?
>
> Rob Bishop
> TASC
>
> "Williams, Christopher" wrote:
>
> > I am trying to draw a string into the J3DGraphics2D object that I
> am
> > grabbing from my Canvas3D. When I do the drawString method,
> nothing shows
> > up on the screen. But when I do a drawLine across the screen
> instead, that
> > works. Are all the draw methods from the graphics object
> implemented? I am
> > using JDK 1.2.2-5 with Java3D 1.2 beta 2 on a Solaris machine.
> > Thanks
> > Chris
> >
> >
> ===========================================================================
> > 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".