Thread: How to avoid a flickring in XOR_PUT

  1. #1
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92

    How to avoid a flickring in XOR_PUT

    How to avoid a flickring in XOR_PUT ,means same allocation is ok for COPY_PUT,but in XOR case the image flickers.
    How to avoid that flickring ?
    AbHHinaay

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Backbuffer/Page flipping/Double buffering. Three names for the same thing.
    Away.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The reason for the flicker is that no matter what you do there will be a split second where the image is not there at all. Your eye catches this which cause the flicker.

    The back buffer principle allows you to draw the screen in memory first - then pixel by pixel overdraw the current screen image with the image in the buffer. This way the images never disappear from the screen - thus no flicker. Same way that a TV re-scans every frame.

    Double buffering is easy to do especially with modern APIs like DirectX. Memory was a concern in the old days, but not anymore.
    As well you could only move 64Kb chunks of memory at any one time in real mode. But with protected mode and DirectX all of those headaches are a thing of the past.

    I could show you how to do this in DirectX, but w/o some understanding of DirectX and COM it would only serve to confuse you which is not my goal. Its not that you couldn't understand DirectX, but w/o a good explanation I would simply be doing more harm than good.

    There are several books on programming in DirectX - Barnes and Nobles has a bunch of em. I would suggest investing some money and getting a few of them if you are really interested.

    PM me and I'll give you some more information.

  4. #4
    Visionary Philosopher Sayeh's Avatar
    Join Date
    Aug 2002
    Posts
    212
    Flicker can also occur when you are drawing across the VBI (Vertical Blank Interrupt)-- when the CRT refreshes the screen. Usually, you want to make sure you are sync'd with this.
    It is not the spoon that bends, it is you who bends around the spoon.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. priority inversion due to pthread_mutex_lock(): how to avoid?
    By mynickmynick in forum C Programming
    Replies: 11
    Last Post: 04-07-2009, 10:34 AM
  2. SQL: When to Avoid Index?
    By alphaoide in forum Tech Board
    Replies: 3
    Last Post: 12-02-2006, 01:25 PM
  3. How to avoid gibberish?
    By duffmckagan in forum C Programming
    Replies: 8
    Last Post: 06-24-2006, 10:53 AM
  4. How to avoid debugging my process
    By tomerav in forum C++ Programming
    Replies: 2
    Last Post: 10-26-2005, 06:30 AM
  5. How to avoid template ambiguity
    By Shadow12345 in forum C++ Programming
    Replies: 2
    Last Post: 11-09-2002, 12:34 PM