Re: [AD] line drawing to memory bitmaps

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


On Thu, 2008-08-14 at 22:41 +1000, Peter Wang wrote:
> Hi,
> 
> I just added a line drawing example.  If you define TEST_MEMBMP it
> crashes when trying to use al_draw_line() to draw to a memory bitmap.
> I'll let someone else debug it.  At a guess, it seems not to be taking
> into account the lock region offset (?)
> 
> Also, did I use ALLEGRO_SINGLEBUFFER correctly?
> 

I think no, you really should use an offscreen bitmap for this. Right
now in X11 it is broken if you move other windows in front of it, and I
don't think we want to "fix" that. Basically, ALLEGRO_SINGLEBUFFER
should not normally be used.

The intended special use case was when you respond to EXPOSE events to
only redraw what is necessary. Which these days with compositing
desktops and so on probably doesn't make sense as the redrawing takes
almost no time. So I wouldn't mind removing the flag. In any case I
guess we should mark it as "don't use in portable programs" in the docs.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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