Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Text on the screen , java3d

2 views
Skip to first unread message

Joyal

unread,
Mar 1, 2008, 3:29:10 AM3/1/08
to
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 :$

Message has been deleted
Message has been deleted

tugalsan

unread,
Mar 26, 2008, 4:38:00 AM3/26/08
to
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

unread,
Mar 26, 2008, 5:34:44 AM3/26/08
to
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

0 new messages