Prev | Current Page 986 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

With GUI controls, this is a
smooth process, as the controls aren ??™ t likely to move around much. Likewise, with video, the whole
frame is updated at once, so you see little with regard to refresh anomalies. Working with graphical
animations, however, can be a little different.
If you write your graphics directly to the display buffer as it is updating, you can often notice tearing,
which will appear as an annoying flicker when you run your animation. To get around this, many
graphics libraries and platforms provide what is known as double buffering. This means that, instead of
writing directly to the display buffer, you write your graphics to a separate off - screen buffer called
the back buffer. Then, once you have written all of your graphics, you perform a flip. This performs the
task of swapping the back buffer with the current display buffer, creating a nice clean, tear - free refresh.
When next you write to the back buffer, you are then writing to what was previously the display buffer.
Simple, huh?
NME supports double buffering by default, and there is no way to turn this off.


Pages:
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998