Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / March 2008

Tip: Looking for answers? Try searching our database.

Text on the screen , java3d

Thread view: 
Joyal - 01 Mar 2008 08:29 GMT
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 - 26 Mar 2008 09:35 GMT
> 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
[quoted text clipped - 11 lines]
>
> 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 (tugalsan@gmail.com)
as I am not using this site much.
byz

tugalsan karabacak TURKEY
tugalsan - 26 Mar 2008 09:37 GMT
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 (tugalsan@gmail.com)
as I am not using this site much.
byz

tugalsan karabacak TURKEY
tugalsan - 26 Mar 2008 09:38 GMT
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 - 26 Mar 2008 10:34 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.