Re: [AD] 4.9.20

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


On Mon, May 17, 2010 at 5:10 AM, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
On May 16, 2010, Peter Wang wrote:
> On 2010-05-16, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On May 16, 2010, Peter Wang wrote:
> > > Probably overdue for one, so I'll make it this weekend.
> > >
> > > Are we ready to call it a beta?
> >
> > Only if we're sure nothing needs changed or added before 5.0.
> >
> > Probably means the capabilities api would have to wait toll 5.2 :(
> >
> > being able to query max texture size and other things at run time would
> > be handy.
>
> Can't be all that important if no one is willing to supply a patch...

Probably because no-one has done anything serious with it yet. To be honest,
I'd probably use it for a few things in my Canva5 project, except it doesn't
exist. I've been thinking of doing it myself, but since no one really seems
interested, meh. hasn't been worth spending the time.


Yes, I think it's rather important for making a polished game you actually intend to distribute. Myself so far I simply assume OpenGL support, FBO support and separate alpha blending are available (and use texture sizes of 1024x1024). If any of the assumptions is wrong the game simply will crash or freeze (1 FPS without frame skipping == freeze :P). In an actual, final version of a game I'd have to detect that of course and figure out a way around it.

A problem is that even after detecting it there's not much you can easily do - no FBO support means designing the whole engine differently (e.g. if you designed your GUI so each widget has a bitmap to draw into). And no separate alpha when it's required means disabling rgb/alpha writes with custom OpenGL and doing twice the amount of blits. We actually should be able to do the latter within Allegro to always provide separate alpha... but it's work much better spent on improving the shaders addon which supercedes most of the blending stuff.

Anyway, I can try making a capabilities patch until the start of the weekend - it wouldn't work on all platforms but at least the API would be there.

In fact, I think Milan suggested to simply add flags to al_get_display_option. So the patch would just make this possible:

int tex_size = al_get_display_option(ALLEGRO_MAX_BITMAP_SIZE)
int npot_tex = al_get_display_option(ALLEGRO_SUPPORT_NPOT_BITMAP)
int bmp_target = al_get_display_option(ALLEGRO_CAN_DRAW_INTO_BITMAP)
int sep_alpha = al_get_display_option(ALLEGRO_SUPPORT_SEPARATE_ALPHA)

This also makes it clear that in the special case of memory bitmaps (which are independent of a current display) none of the options applies.


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