[movitz-devel] Graphics APIs and layers
M Bealby
mbealby at gmail.com
Sun Apr 29 09:58:35 UTC 2007
Hi all,
Rather than putting this straight onto the wiki I thought I would throw it out
there to the rest of the developers first.
I have my very basic VMWare graphics driver working (thanks to some lisp help
from frodef last night). Currently it can change video mode and returns the
address of the linear framebuffer, although the accelerated functions should be
fairly easy to implement.
We currently have a number of graphics drawing functions in vga.lisp. These
support the vga driver, and similar ones can be created for the vmware driver.
What I'm after is the layer above. For example, a 'generic' line drawing
functions which will pass down to the correct video drivers line drawing
function (to take advantage of any acceleration support).
I know I could do this with function pointers in C, but I do not know the lisp
equivalent. If someone could point me to the right areas I will read up on
those sections to have a go at an abstraction layer.
The other question is what features do people want / need in the graphics API
layer?
I have the following list so far:
* Line / polyline drawing
* Circle drawing (filled / unfilled)
* Rectangle drawing (filled / unfilled)
* Resolution (get / set)
* Individual pixel (get / set)
* Viewport (get / set)
* Buffer flips
* Surfaces
* (Text)
I envisage the graphics API to use as much hardware acceleration as possible.
To this effect I also suggest all drawing to occur on video memory surfaces if
available (similar to SDL) -- hence the surface routines. The net result of
this (apart from using all the hardware scaling etc.) is windows in a future
GUI can just be blitted to the screen similar to OS X.
Any thoughts would be much appreciated,
Martin
More information about the movitz-devel
mailing list