What follows is an e-mail that Brian Paul sent me in December of 2002 about the DRI configuration file stuff. I believe that using the Python dictionaries will be much lighter-weight than using XML. It should get the job done, too. :)

> Here's a few more thoughts on configuration. I figure I'd run them
> past you before posting to the list to avoid premature criticisms.
>
> 1. Use Python syntax. For example, a dictionary:
>
> {
> 'swap_on_vsync': 'false',
> 'force_anisotropic_filtering': 'true',
> 'default_texture_depth': 32
> }
>
> In python, this could be parsed as follows:
>
> f = open('configfile')
> options = eval(f.read())
> f.close()
>
> options would then have the dictionary of name/value pairs.
>
>
> 2. Getting a little fancier, a dictionary of configuration options
> could be "qualified" to indicate that the options only apply to a
> particular driver, screen or application. For example:
>
> {
> 'driver': 'radeon',
> 'option': 'some value',
> [etc...]
> }
>
> or
>
> {
> 'application': 'unreal tournament',
> 'option', 'some value',
> [etc...]
> }
>
> if a dictionary does not have a 'driver', 'application', or
> 'screen' qualifier the options would apply to all drivers, apps
> and screens.
>
>
> 3. A qualified (or unqualified) set of options could be known as
> a "profile". The user's config file could contain any number of
> profiles (i.e. a list of dictionaries). Upon libGL/driver initialization
> we'd read the config file and set all options in the profiles whose
> qualifiers match the current app/driver/screen.
>
>
> 4. In the GUI tool I imagine that a profile would be represented with
> the following UI elements:
>
> - profile name (a type-in field)
> - application qualifier (a check-box to enable and a type-in to
> set the application name).
> - driver qualifier (a check-box to enable and a type-in)
> - screen qualifier (a check-box and an integer spin widget)
> - a list of name/value config options
>
> A "Profile" menu would list the existing profiles by name and let you
> switch between them. An "Edit" menu might have "Create New Profile"
> and "Delete Current Profile" items.
>
> Of course, having an open config file syntax means anyone can write their
> own config tool.
>
> When a new profile is created, we'd find the default DRI driver for the
> default screen and interogate the driver for its config options. We'd
> list those options with their default values.
>
>
> Anyway that's my brain dump. I really don't have any time to spend on
> this project but I'd like to at least offer some of my opinions.
>
> -Brian



-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to