C (77/257)

From:
Date:07 Feb 2001 at 20:55:40
Subject:Re: Cybergraphics/LockBitMapTagList()

Hello Gabriele

On 07-Feb-01, Gabriele Svelto wrote:

> using it for all the time you want? The autodoc for the function says
> that the pointer is invalid after you call UnLockBitMap but I suppose
> this could be true for a window (it's bitmap may change size/position)
> but is this true for a screen too? Or there is another method to get a
> valid pointer? Thanx in advance

bitmap pointer obtained via LockBitmap() call will be valid also after
unlock() call. in most cases ;) if video card has 4 or less mb of memory, it
may happen that you bitmap will be flushed from video memory, then you will
write your data on other screens (for example wb).

you can call lock/unlock functions every 10 frames for example, ths should
give you significant speedup, and you will avoid trashing other screens.

for window rendering, it is also possible to avoid lock/unlock calls, just
allocate bitmap, draw there something, and then blit it into window.
Eactly the same as with screen rendering, but you got additional
BltBitmapRastPort() call.

Sebastian

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981575796/
---------------------------------------------------------------------_->