Graphics help
- Posted by David Cuny <dcuny at LANSET.COM> Nov 15, 1998
- 544 views
I've been working on scrollbars in Dos32Lib, and I've got a question. Redrawing the scrollbars displays a lot of "flashing" as the graphics are redone. This is something which I would rather avoid. As far as I can understand, you can avoid this by copying the current screen to a second video page, write to that page, and then display the page when the update is complete. This assumes that your computer actually has enough video memory to support multiple video pages. I *think* the term is "double-buffering". I attempted something like this in my TextGUI, but I have a couple of questions. Other than a couple of added tests, I assume that the only real added cost is that of copying the current screen to another oprtion of video memory. If this has to be done using xxxx_image, then there's a lot of overhead associated with translating from pixels to sequences and back again. Can this be avoided by using peek/poke? What modes does this work in? Does anyone have any suggestions here? If there is a large overhead, I'll just skip it and live with the mediocre graphics. Along those lines, as cool as the Java look and feel is, the graphic overhead associated with it seems counterproductive to the goal of the library - to let it run on older, slower machines. So there's a good chance that I may change the L&F to something simpler that can be rendered much faster. -- David Cuny