there is what you should do, but doesn't work in the current api...
and there is what you can do now, but might want to change when the new api
is released...
using the pre- or postswap is very expensive for drawing, and on the other
hand you would only want to update when your content changes. under opengl i
used textured planes for my mask, and raster objects for time and location
displays, both positioned in the viewpoint (directx doesn't support your
viewpoint geometry). for the textured planes i copied code from the Text2D
class.
now you need to use small rasters for updatable displays because of the way
textures are currently handled and bugs in the texture loader. you won't
have much fun with animating textures because you can receive out of memory
errors faster than you can say 'java-n-pizza' since every new texture is
copied. this will especially not work for displays that need constant
refresh (like time, status or position). so all you can do (as far as i
know) is position a raster in your world and allow image write for both
raster and imagecomponent2d, and then keep updating by drawing a new
bufferedimage setting it to the imagecomponent and setting this back to the
raster.
i did all this in a seperate thread, and had no sync, texture-locking or
flikkering problems.
i could prepare sample-source for you if needed...
updating your 2d billboards with constant changing textures sounds like
java.lang.OutOfMemoryException...
the only way
-----Urspr�ngliche Nachricht-----
Von: Yohan Baillot <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Freitag, 17. September 1999 16:51
Betreff: [JAVA3D] Overlay plane and stuffs
>Hello,
>
>there is apparently no way to access the graphics in two dimension
>to write text (score, position) on a canvas3D. I did extract the graphic
>context from my canvas3D and extended the canvas3D class to
>write text using drawString in the preswap or the postswap method.
>No matter where I put this drawString (before or after swap) the text
>is flickering and this is kind of disturbing. Any suggestions?
>
...
>We have some label floating as 2D billboards in our scene. How can
>we modify the text? Do we have to erase and recreate the billboard
>each time?
>
...
>Thanks for any info in advance
>
>Yohan Baillot
>
>===========================================================================
>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".