Re: [AD] Docs and set_gfx_mode

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


Christer Sandberg wrote:
I believe Windows needs window width/height sizes to be a multiple of 4 (4, 8, 12, 16, etc). This is a WinAPI "limitation" which Allegro can't work around.

That was what I guessed, but I didn't know since I didn't find it in the
docs ...

I'm not actually sure if that limitation exists.. I just remember hearing it mentioned somewhere, but I never tried to find out if it's true or not. But if it does exist, I'm sure you'll get an "invalid resolution" error from allegro_error after set_gfx_mode fails.

So more up-to-date description maybe would make the docs more clear?

Yes. People have been going through the docs recently, trying to remove DOS and DJGPP-isms to clarify these things more.

GFX_AUTODETECT can be a little tricky to understand, but it's actually simple. It will search the configuration options for the gfx_card variables (including the ones specifying resolutions and detection order) and will succeed when it gets one of the drivers to set a mode, whether it is fullscreen or windowed.

Ahh.. I see, I didn't get the idea to look in the config section when
reading about set_gfx_mode. But you are right, there it is. But what
happens if there is no `gfx_card' variable in the config file (anyway,
in general I don't know about the end users' hardware, and quite often
the same applies to the users themselves).

If there's no gfx_card, it'll "autodetect" (ie. search known drivers until it finds one that works), allowing both windowed and fullscreen drivers to be checked.

8-bit. A hold-over from when Allegro only supported 8-bit color.

But where did you find it?

Under set_color_depth:
"... Valid depths are 8 (the default), 15, 16, 24, and 32 bits."

This is from the current CVS tree docs though, I'm not sure what the 4.0.3 docs have.

If ALLEGRO_VRAM_SINGLE_SURFACE is defined, yes.

You are right, I found that now, when searching on
`ALLEGRO_VRAM_SINGLE_SURFACE', but I didn't know that I should.

Yes, ALLEGRO_VRAM_SINGLE_SURFACE does seem to be a bit obscured since several people don't even know it exists.

Don't expect a virtual screen in windowed modes. The X11 driver allows it, but there are drivers that don't.

Hmm, I still miss that line.

Virtual screens itself are driver dependant, so I don't think a seperation needs to be made for fullscreen/windowed modes.

If ALLEGRO_VRAM_SINGLE_SURFACE is not set and the driver happens to
allocate as big virtual screen as possible, does that mean that the
amount of memory available for creating video bitmaps are minimized?
(and where can I read about it...)

If ALLEGRO_VRAM_SINGLE_SURFACE is not defined, you will never get a virtual screen (not one of any useable size, anyway). In that case, video bitmaps are first allocated from the screen, then it'll allocate seperate vram surfaces from the OS.

Most of these things are mentioned in the docs (some aren't, though). Allegro's docs are quite complete, so if the docs don't mention

One of the reasons that I chosed Allegro is that the docs are good. I
can't say, however, that there are no space for improvements.

Of course. And please, feel free to continue pointing out what you think should be improved.

- Kitty Cat




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