Re: [AD] question about opengl bitmaps

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


On the subject of fonts, I agree with Milan it should be locking once,
but also should it use sub-bitmaps rather than individual mini-bitmaps
for each glyph? In my copy of the Red Book it says that avoiding
texture changes is one way to improve performance. At the moment it
changes the texture for every character.

Pete


On Mon, Mar 24, 2008 at 1:05 PM, 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. Or use a memory bitmap (um, do
>  they even exist?). 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. :)
>
>
>  --
>  Milan Mimica
>  http://sparklet.sf.net
>
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  --
>  https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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