Article View: gnu.gcc.help
Article #46527djgpp: How to achieve smooth graphics animation ?
From: Mike Robert Brewer
Date: Sat, 12 Nov 1994 13:42
Date: Sat, 12 Nov 1994 13:42
26 lines
1817 bytes
1817 bytes
I am using the grx graphics library, and would like some help on achieving non-flickering animation. Basically the output of my program is a continually evolving 2-D grid of points. I draw the grid on one cycle through. Then the next time round I rub it out and draw the new one. But I get a horrible flickering. The program is generating new grids at a fast enough rate to avoid the < 70 Hz flicker. Seems like a sort of temporal interference type problem. The Borland C/C++ graphics supports switching between display pages, so that you can draw the new grid on a "virtual" page and then quickly switch to it. (I tried that on a Borland compiler but still got the flicker.. maybe I'm doing something totally stupid?). Does the grx library support something like that? The "context" thing sounds similar, but it seems that you can only draw to the "current" context, which is presumably the one that is displayed at the time. My knowledge of animation on computers is minimal (can you tell?) so it could be there is a better way of doing things than switching pages. But if that IS the best way, how do you do it in djgpp? Thanks! Mike B. mrb@robots.ox.ac.uk
Technical Details
Message-ID:
<1994Nov12.134251.7779@juliet.robots.ox.ac.uk>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!pipex!uknet!comlab.ox.ac.uk!mrbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a22f8a9b395695da,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1994-11-12 05:42:51 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!pipex!uknet!comlab.ox.ac.uk!mrb From: mrb@robots.ox.ac.uk (Mike Robert Brewer) Subject: djgpp: How to achieve smooth graphics animation ? Message-ID: <1994Nov12.134251.7779@juliet.robots.ox.ac.uk> Originator: mrb@juliet.robots Organization: Robotics Research Group, Engineering Science Dept, Oxford, UK. Date: Sat, 12 Nov 1994 13:42:51 GMT Lines: 27