Unless u use 1.2 version of Java3D, the only way to do it right is to
output any such strings OUTSIDE Canvas3D. The deal is that to preserve
acceptable performance in 1.1.x versions u can draw anything _only_
before or after the Canvas3D completely redraws itself (by calling
super.paint method in case u override Canvas3D.paint). Thus any custom
drawing done would be 'overpainted' each frame by the scene contents.
In 1.2 version u can get access to the Canvas3D off-screen buffer and
draw your String on it prior to outputing the whole image (3D scene +
YourString) to physical display. U can try to create your own
offscreen buffer even 4 1.1.x Java3D libraries, but i'm sure that this
would drop the performance drastically. In real-time applications
(with 1.1.x library) the performance drops to the almost unacceptable
level (not mentioning that irritating flickering) even when u paint
the String directly on Canvas3D (by overriding its paint method)
WITHOUT any custom double buffering.

So, i'd rather suggest u to use (ESPECIALLY if u develop a real-time
application) a separate window 4 any custom output (eg, create a kind
of status bar, or something like that). This worked 4 me just fine.

vladimir
             -=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<

In your previous letter u wrote:
--------------------------------
VE> As part of my debugging effort, I wanted to display the Canvas3D's framerate
VE> in the window somewhere. I'm overriding Canvas3D, and trying to draw the
VE> string directly into the Graphics of the Canvas3D in postSwap, and it draws,
VE> but with lots of flickering. What would be the best way to do this sort of
VE> thing? Create a billboard? Display info outside the Canvas3D? Any help or
VE> examples of this would be appreciated. Thanks.

VE> ===========================================================================
VE> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
VE> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
VE> [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".

Reply via email to