Re: [AD] No more video/system bitmaps

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


On Tuesday 21 June 2005 20:25, Elias Pschernig wrote:
> I think the focus of Allegro should stay that it should be be easier to
> use than OpenGL. 

[...]

> So you would do: 
> 
> al_select_bitmap(my_bitmap);
> al_set_color(1, 0, 0, 1); // red color is set for the context of 
my_bitmap
> al_line(100, 100, 200, 200); // a line is drawn into my_bitmap
> al_select_bitmap(); // default output
> al_draw_bitmap(my_bitmap, 50, 50); // my_bitmap is drawn

Heh... you know, that syntax actually reminds me quite a lot of OpenGL.

> And I think, also the color should be made a parameter of the current
> context.

I disagree. The current API is marred with _ex functions because we wanted 
to get rid of a state-based system, remember? It's also not a good idea 
from the point of view of multi-threading. One might argue that it is 
pretty dumb to draw to the same display from multiple threads anyway, but 
I think one could argue that it makes sense to draw to *multiple* displays 
(or multiple display contexts) from different threads. Global states are a 
bad idea from this point of view.
Having states for display objects, on the other hand, would make more 
sense.

I would still be opposed to the particular example of state-based colours 
though, unless a strong case can be made in favour of them.

Evert




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