Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Image Flicker?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Felix




PostPosted: Sun May 21, 2006 3:05 pm   Post subject: Image Flicker?

I have this program that draws a face and moves it around the screen... HOWEVER, whenever it moves, it experiences some severe flickering and looks like junk...

What do I have to adjust to get it to not flicker?
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sun May 21, 2006 3:12 pm   Post subject: (No subject)

You'll need to use double buffering. That means, set the "offscreenonly" option, like this:
code:

View.Set ("offscreenonly")

This only needs to be done once, at the start of your program

Then, whenever you want your drawings to be flipped into the front buffer (shown all at once), do a
code:
View.Update

This will probably go inside your loop after all your drawings.

Check the Turing help file (press F10 in turing) to learn more. You can also search through [Turing Tutorials].
Felix




PostPosted: Sun May 21, 2006 3:12 pm   Post subject: (No subject)

By the way, I've seen those View.Set ("offscreenonly") and View.Update ideas, and all they do is completely mess up the part of my program that works Confused
Cervantes




PostPosted: Sun May 21, 2006 3:22 pm   Post subject: (No subject)

Then you're not using them properly. Post the code (with View.Update and offscreenonly). They're probably mispositioned.

That, or you're using an old version of Turing that doesn't support View.Update. (A version prior to v4, I think.)
Felix




PostPosted: Sun May 21, 2006 3:29 pm   Post subject: (No subject)

Oh... Nevermind, I just figured out what messed my prog up... View.Set ("offscreenonly") and View.Update worked fine... thanks Cervantes[/u]
Felix




PostPosted: Sun May 21, 2006 3:30 pm   Post subject: (No subject)

Yes, I mispositioned them Very Happy my bad!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: