Re: [AD] Missing system vtable entries on OS X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thu, 2010-01-28 at 09:07 -0500, Evert Glebbeek wrote:
> On 28 Jan 2010, at 6:51 , Elias Pschernig wrote:
> > Can you loop through all possible values and query them?
>
> In what sense do you mean?
> I can try to set a particular pixel format (so a combination of
> values), query that and see whether the options I'm told I'd get match
> up with what I asked. In other words, I can go and try every possible
> permutation of values and filter out all the ones that don't give me
> exactly what I asked for, but it sounds like a lot of hassle and I
> don't honestly see the benefit.
> Correct me if I'm wrong, but I see this mainly as something that is
> useful for when Allegro needs to decide on what mode best describes
> what the user asked for. That's something Apple's OpenGL
> implementation does already.
> I simply don't think these functions make as much sense on OS X as
> they do on other platforms.
>
> Apart from saying that this information is simply not available, the
> only other option I can think of is to do a subset of what I said
> above: not try every possible combination, but try a couple of common
> ones and simply report whether they will work or not. That is a bit
> misleading though.
>
Well, most games will want something like a settings screen where you
can select the monitor resolution and amount of super-sampling and so on
- in our current API the way to do that is to first get a list of the
available formats with al_get_num_display_formats() then check whether
it's a usable mode with al_get_display_format_option().
If you say those two functions can't work in OSX, then there's no point
having them in A5 and we should replace them with an alternative which
works. I haven't looked at the code yet, but from what you said can we
maybe do something like this?
n = al_can_create_display(w, h)
And it would work just like al_create_display (using all the flags which
were set), but instead of trying to create a display just return how
many possible formats there are (OSX could always return 1). After that
al_get_display_format_option() could be used to query the actual values.
--
Elias Pschernig <elias.pschernig@xxxxxxxxxx>