[Scummvm-devel] New GUI thoughts in the Wiki

Marcus Comstedt marcus at mc.pp.se
Sat Nov 19 05:20:05 CET 2005


Max Horn <max at quendi.de> writes:

> Please elaborate on this. I am not sure how I'd code a GUI using a
> "display list approach". Could you give some more details on how you
> think this would work, maybe including some example code etc.?

Well, much the same way as you would previously, but instead of
calling a lot of GUI-internal functions that manipulate a Surface,
and then giving this Surface to the backend for displaying, you would
call backend functions to achieve the same operations (e.g. "place
this pixmap here" or "draw a line between here and here in this
colour").  Then the backend might or might not have a Surface it
incorporates these operations into, but the GUI code itself will never
see this Surface, and will never manipulate any individual pixels.
If you have ever used OpenGL, you'll know what I am talking about.


> Keeping in mind, of course, that this should work for 320x200 8bpp
> targets just as well as for 640x480 16bpp or bigger targets; and that
> partial redraws are a must on slow targets (e.g. a full redraw of the
> display list each time a click happen is no option)

Yes, we'd need to design it so that the backend can choose whether to
do a partial or a full redraw.  I think this can be accomplished by
submitting a delta to the displaylist rather than a whole new
displaylist.


  // Marcus






More information about the Scummvm-devel mailing list