Re: [AD] fix for using transformations without a display and make blending mode a per-display state |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2010-03-04, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> On Fri, 2010-03-05 at 09:27 +1100, Peter Wang wrote:
> >
> > I fixed(?) a simple problem in al_use_transform where the
> > current_display->vt may be NULL. I don't know how many other places
> > need a similar fix.
> >
>
> Yeah, the transformations were added without taking the possibility to
> draw to memory bitmaps into account it seems.
>
> I fixed another problem earlier having to do with how I allocated the
> fake display... it's now put into static memory instead of allocated,
> even though it should only be needed vary rarely, so I'd prefer to
> allocate it. Is there a way to call a function when a thread is
> destroyed in Windows? (Like we do with pthreads for OSX and IPhone.) If
> yes can implement a better solution.
Does the code in DllMain work?
Anyway, it's only a tiny amount of memory so I think allocating it with
thread_local_state is even preferable. You don't really need
memory_display then; just initialise memory_display_storage when the
rest of the structure is initialised and return &memory_display_storage.
Peter