Re: [AD] Docs and set_gfx_mode

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


On Thu, 2004-09-23 at 12:28, Chris wrote: 
> Allegro doesn't itself "support" modes. You can pass it any resolution 
> you want, and if the card/OS can set it, you can use it in Allegro.

OK, I see
> 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 ...

> > "Switches into graphics mode"
> > "The w and h parameters specify what screen resolution you want"
> Both of these are hold overs from when Allegro was DOS-only, and 
> windowed modes weren't directly available. 

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

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

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

But where did you find it? 

> The depth you specify when using a windowed mode is the depth that the 
> 'screen' BITMAP will use. Allegro will automatically convert it to the 
> proper color depth for the OS driver (some OS drivers will handle this 
> conversion automatically, others won't).

Sounds reasonable, maybe I should have understood this.

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

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

> > What is the precise meaning of setting one of the
> > parameters v_w or v_h to 0?
> 
> It means you don't care about the virtual screen size. Some drivers will 
> allocate as little as possible, others will allocate as much as
> possible.

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


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

-- 
Christer Sandberg <csg01@xxxxxxxxxx>





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