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 / June 2007

Tip: Looking for answers? Try searching our database.

flicker in scene3D

Thread view: 
Misterysword@hotmail.com - 25 May 2007 23:44 GMT
Hi! I have got a program that it shows some scenes (I draw the scene,
I erase it, and I draw another scene...).

The problem is the flicker. I know that I must use the method of
double buffer.

How would you do this method? (implementation)-->An example code,
please!!!

Regards!!!
Thorsten Mann - 05 Jun 2007 18:47 GMT
Misterysword@hotmail.com schrieb:
> Hi! I have got a program that it shows some scenes (I draw the scene,
> I erase it, and I draw another scene...).
[quoted text clipped - 6 lines]
>
> Regards!!!

Hello.

1] Probably you don't have to use double buffering

Have a look at:

public final class WakeupOnElapsedFrames extends WakeupCriterion

You can use it to let your application only paint on a new
frame: private WakeupCondition trigger = new WakeupOnElapsedFrames(0);

-> see link to java tutorial at bottom

2] You are sure that it is a painting problen and not
a garbage collection inducted problem?

Run your programm with this java command line

java -verbose:gc <programmname>

If the your programm flickers at the same time as
you see Garbage Collector output then you should
try to avoid objects generated and then garbage collected:

Read Java 3D Tutorial: chapter 4 page 4-8..4-10
http://java.sun.com/developer/onlineTraining/java3d/

and some thougts about garbage collection (in German)
http://www.performance-tips.de/speicherumsatz.html


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.