Re: [AD] Rewritting set_gfx_mode (was: GFX_WINDOWED)

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


Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> 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".

Ok, done.

> 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).

Actually, I prefer #2, which I already had a crack at implementing
(see another message in AD).  I like this method more than #1
because it's almost transparent: there's only one call to `dlsym'.

> 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 think we've been making too many changes for the next one to be
beta (my little stunt worked :-).  So it can probably go in.

As for a plan, well, I'd like some feedback on my aforementioned
patch.  If everyone agrees it's a good idea, then you could redesign
`set_gfx_mode' with plugin drivers in mind (right now I had to do a
bit of a hack).  I think this goes hand in hand with Laurence's
driver registration idea.

-- 
FLOTTA FACTOR (FLAH ta FAK tur), n.  The proven scientific fact that at a
self-service pump, the last ten cents take longer to reach the tank than
the first twelve dollars' worth.  -- Rich Hall, "Sniglets"



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