Text on the screen , java3d  
Author Message
Joyal





PostPosted: 2008-3-1 16:29:00 Top

java-programmer, Text on the screen , java3d hey mates, im really newbie with java3d, im learning this api, and
doing somes test, but i have my first question, i want to put some
text on the screen, i know its exist a Text2D class, but its interact
with the virtualuniverse , i want only put flat text on the screen,
with some data, maybe the fps , coordenates , etc

i was trying to use the getGraphics of Canvas3D and use drawString but
didnt work, i did the same thing with Frame also with Applet, i got
the graphics and used drawString, but nothing

how can i do to be able to do this? could you give me somes examples?


i hope you can help me:D

PD: sorry my bad english , i from venezuela :$
 
tugalsan





PostPosted: 2008-3-26 16:36:00 Top

java-programmer >> Text on the screen , java3d On Mar 1, 10:29燼m, Joyal <email***@***.com> wrote:
> hey mates, im really newbie with java3d, im learning this api, and
> doing somes test, but i have my first question, i want to put some
> text on the screen, i know its exist a Text2D class, but its interact
> with the virtualuniverse , i want only put flat text on the screen,
> with some 燿ata, maybe the fps , coordenates , etc
>
> i was trying to use the getGraphics of Canvas3D and use drawString but
> didnt work, i did the same thing with Frame also with Applet, i got
> the graphics and used drawString, but nothing
>
> how can i do to be able to do this? could you give me somes examples?
>
> i hope you can help me:D
>
> PD: sorry my bad english , i from venezuela :$

just ovverride postRender method in Canvas3D
use getGraphics() method and use it
I know it flickering but itworks :)
if you find a better way please sent to my email (email***@***.com)
as I am not using this site much.
byz

tugalsan karabacak TURKEY

 
tugalsan





PostPosted: 2008-3-26 16:37:00 Top

java-programmer >> Text on the screen , java3d just ovverride postRender method in Canvas3D
use getGraphics() method and use it
I know it flickering but itworks :)
if you find a better way please sent to my email (email***@***.com)
as I am not using this site much.
byz

tugalsan karabacak TURKEY
 
 
tugalsan





PostPosted: 2008-3-26 16:38:00 Top

java-programmer >> Text on the screen , java3d just ovverride postRender method in Canvas3D
use getGraphics() method and use it
I know it flickering but itworks :)
if you find a better way please sent to my email (t u g a l s a n @ g
m a i l . c o m)
as I am not using this site much.
byz

tugalsan karabacak TURKEY
 
 
tugalsan





PostPosted: 2008-3-26 17:35:00 Top

java-programmer >> Text on the screen , java3d 1. hey man, the code I wrote above, use it on postSwap method, iyt
filckers less.

2.I found a code on another thread in this site and made a class for
you:

class Canvas3DWithDebug extends Canvas3D {
Canvas3DWithDebug(GraphicsConfiguration graphicsConfiguration)
{
super(graphicsConfiguration);
}
public void postRender() {
getGraphics2D().drawString("asli", 30, 30);
getGraphics2D().flush(true);
}
}

it work fine but no font or color chnage can be made. its always
white.


if you find a good code, dont forget to send me email man,
byz