Re: [AD] question about opengl bitmaps |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-03-24, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> >
> > Ah, how could I miss that. Can we somehow avoid that step in the usual case
> > when the copy in main memory is already up to date?
>
> We can mark the memory dirty if drawing to the texture happened since the last
> lock_region(), but i think it's error prone, and an optimization at the wrong
> level in general.
> The font loader should just lock the bitmap once.
That would be good, but how to do that? If I have locked a bitmap, can I use
it as the source of a blitting operation without unlocking first? I assumed
yes, but it didn't really work in fontbmp.c. And it would raise all sorts of
questions about locking, I think.
> Or use a memory bitmap (um, do they even exist?).
Ok, it fixes this particular problem.
> And try not to copy the whole bitmap if not necessary. Or an
> bitmap function would would mark it read only?
> See, plenty of other things to consider. :)
I never suggested otherwise :)
Peter