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 ?
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
Backbuffer/Page flipping/Double buffering. Three names for the same thing.
Away.
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.
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.