[AD] Rewritting set_gfx_mode (was: GFX_WINDOWED)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 7 Apr 2001, Peter Wang wrote:
> Implementation is another matter.  `set_gfx_mode' is already a mess.

True. And worse, we still seem to be modifying it too much lately :-)

IMHO one of the things we should put into the todo (even if it's in the
wishlist) is a rewrite of that function, for the simple reason it's very
obscure, ramified, and it will be hard to make it support things like the
feature listed as "function to get a list of supported video modes".

Also, for the linux dynamic driver loading, IIRC there were several
options: 

1) Direct use of dlopen with external libraries.
2) Use of dlopen with wrappers around external libraries.
3) Preconfiguration of custom shared lib with dummy symbols when some
   external library is not available: other end users will have same
   symbols but possibly working external lib.

AFAICS number three is prefered by Peter and Eduard Bloch: should be go
this way? I once thought that with the dlopen thingy Allegro would be
compiled *without* graphic drivers and would load them dynamically in a
plugin like fashion (like when you open Gimp and all filters/plugins are
scanned). 3) will make this inviable, replacing the dynamic library would
solve this, but won't this force people recompile their binaries too
because of new symbols/defines and such things?

Besides, 3) doesn't really help binary package distribution of Allegro,
because Eduard may create a precompiled Allegro for Debian which doesn't
use xxx, and the users having this xxx won't be able to use it because
there are only dummy symbols for it despite the fact that the lib is
there, forcing the mantainer to keep with the different precompiled
versions dance or forcing the user to get the source package and build it,
right?

Oh, but I am getting away: does somebody have a plan on how set_gfx_mode
should look? At the moment I am satisfied with the state of todo's linux
part so I am going to focus on the whislist and maybe this set_gfx_mode
rewrite could go in? 

I am voting for a set_gfx_mode rewrite (possibly seconded by everybody),
and for implementing it myself (which is surely a bad idea :-). 
Suggestions?

 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx   http://gradha.infierno.org



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/