Re: [AD] Font drawing bug

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


Evert Glebbeek wrote:

The one caveat is if there is a situation where doing so is expensive, and you really only want to do it if you have to. Is there such a situation (when dealing with textures/video bitmaps, say)?

On linux, memset() is usually a much more expensive operation than malloc(), because it's at memset() that the memory is actually allocated by the kernel.

Say you have a C++ class which contains several bitmaps which are created in constructor, but not filled until some method is called. Such programs could have large loading time, which is a major concern in games.
Or when you load sprites and you don't need the bitmap to be cleared.

The only situation where you want the bitmap to be cleared is when you draw your own sprite from the code.


--
Milan Mimica
http://sparklet.sf.net




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