Re: [AD] New graphics driver -- GFX_FORCE?

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


In reply to Vincent Penquerc'h <vincent@xxxxxxxxxx>:
>i'm not sure if this would be of any use, as programs that request a 
>mode will most likely expect it to be set if set_gfx_mode does not fail.

Yes; it doesn't guarantee correct behaviour.

>you will tell me that people should use _color_depth and request the 
>screen width and height after that, but this is only academic :)

:-) The Allegro utilities and test program do this, but I wouldn't
expect other things to. Although the GFX_FORCE driver does support
setting a different color mode to what is passed as a parameter, it
doesn't provide any sort of emulation, so there would be a note in the
documents saying that you should only really use this for 15/16 or 24/32
bpp issues.

> on the 
>other hand, if you set up everything so it is transparent (eg the screen 
>global bitmap is set to the size expected by the coder and centered in a 
>larger actual video mode), then this could work. how did you do it 
>exactly ? 

At the moment, everything is set up exactly as if you had passed the
forced parameters. I had thought about making it fairly transparent, but
come to the conclusion that it doesn't really matter. To be honest, you
would only really be using this driver when the alternative is horrible
(in the case of my laptop, unreadable text in 640x480; in other cases,
no graphics mode at all), so if the user sees some garbage where the
program has stored some stuff in video memory or isn't clipping sprites
drawn off the edge of the screen, that is pretty much acceptable.

On my laptop, all of the allegro examples handle having a forced
resolution gratefully; for instance, ex12bit displays itself in a
640x480 window in the top left of an 800x600 screen.

The only reason I suggest adding this to the lib is that it is not very
easy to write an addon to do this :-(

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



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