On Wed, Dec 04, 2002 at 11:06:01AM -0800, Allen Akin wrote: > On Wed, Dec 04, 2002 at 12:57:44AM -0600, D. Hageman wrote: > | This illustrates one of the bad points of using environment variables. > | Will we have to add environment variables every time a new app is pushed > | out the door? Bad approach. > > In general, if a bug affects every app, then the driver needs to be > fixed. Ian's scenario (and my reply) were about the case in which you > want to change driver behavior for one app without affecting others.
But this isn't about application bug workarounds, it's about users specifying hinting or forcing extensions to be active or whatever. > What I had in mind was that supporting a bunch of low-level switches > involves lots of conditional code deep in the drivers. Not necessarily. A configuration to force, say, FSAA to be enabled would just require that the initial state of the OpenGL context to be changed, and for the original issue which sparked this debate (changing the unhinted internal texture format from "same as display" to 8 bits/channel) could be handled by adding a "default texture depth" variable to the context information and use that when the format is specified as GL_RGB instead of GL_RGB8 or whatever. I basically see three camps in this discussion: 1. Users should be able to configure default behavior using configuration files (which would be selected based on argv[0] or similar) 2. Users should be able to configure default behavior using environment variables (which would be configured on a per-application basis using wrapper scripts or a launcher program or similar) 3. Users should not be able to configure default behavior; applications should specify all behavior explicitly if it matters, and expose this as an application-level configuration option to the user Personally, I'm torn between camps 1 and 3. Actually, I just thought of a solution which could possibly satisfy all three camps: have a libGL wrapper library (loaded via LD_PRELOAD) which overrides functionality as needed. Want to force FSAA to be enabled? Put it into glXCreateContext(). Want to force GL_RGB8 when the application chooses GL_RGB? Do it in glTexImage(). Hey, if you want to force GL_RGB4 when the application chooses GL_RGB8, you could do that too! Basically, I see no reason to put this configuration into the drivers themselves, as it could easily be done using an LD_PRELOADed library. -- http://trikuare.cx ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel