Hi !

> > > > I'm interested in also setting up Z
> > > > and alpha buffers. How would I go about doing that ? 
> > Basically same thing ... add a function to allocate them to the kernel
> > driver and them mmap. We should talk about a generic API for requesting 
> > such extra features, though.
> 
> No mmap. Yuk!! 

Huh ? Unless you have a very complete 3D-Drawing engine in Hardware, you'll
need to mmap the z-Buffer ...

> I like to be able to set a flag and then have the module look at the 
> flag and try to load that feature. 

My idea about supporting optional features like that is something that would
be similar to what SANE does to control scanners.

I designed the SANE protocol together with David Mosberger-Tang to drive
about any scanner in this universe.

The idea is, that a scanner is just a device that has several "controls" or
"options" as we call them that can take different values.

There are different types of such values like booleans (switches), buttons,
continous numeric (sliders/dials), text (free entry or select-from-list).

This scheme is controlled with a relatively compact API:

GetOptionDescriptor: get the description of an option: Type, values that 
can be taken, help text, etc.

GetOption: Get the current option setting.
SetOption: Set the option to a value. This has several possible return values
that indicate, that e.g. the change could not be done and the next-best
value was chosen, that the option influenced the settings of some other
option or that the entire option tree should be rescanned, as the setting
made other options available or similar.

StartScan: Make options active in the hardware and start scanning.

Regarding a translation to GGI I'd suggest to translate StartScan to "Activate
Featureset" as a kind of new "SetMode" and a "Load active Featureset" function
that allows to recover from failed requests back to the current state of the
hardware - this is handy, if you have two possible ways to implement a 
particular mode of operation and you try the first and fail somewhere while
trying to allocate all needed features. You can then easily start over and
try the alternate method.

Setting up a mode would then internally be handle a bit like this:

SetOption(X_VISIBLE,640);
SetOption(Y_VISIBLE,480);
SetOption(X_VIRTUAL,640);
SetOption(Y_VIRTUAL,480);
SetOption(DEPTH,16);
SetOption(COLORSPACE,YUV422);

ActivateFeatureset();

I think you get the idea. Of course you'd have to either closely examine 
return codes or (more easily) check that the mode you want is set up using
GetOption (remember that SetOptions can influence each other).

Comments ?

CU, ANdy

-- 
Andreas Beck              |  Email :  <[EMAIL PROTECTED]>

Reply via email to