| Home
| Previous
| Next
| Up

GetBitmapBM

Copy a block of video memory to a location in system memory with Bus Mastering.

Declaration

void NAPI GA_2DRenderFuncs::GetBitmapBM(
void *dstAddr,
N_int32 dstPhysAddr,
N_int32 dstPitch,
N_int32 srcLeft,
N_int32 srcTop,
N_int32 width,
N_int32 height,
N_int32 dstLeft,
N_int32 dstTop,
N_int32 mix)

Prototype In

snap/graphics.h

Parameters

dstAddr | Address of destination bitmap in system memory
dstPhysAddr | Physical address of destination bitmap in system memory
dstPitch | Pitch of destination bitmap in bytes
srcLeft | Left coordinate within source bitmap to copy
srcTop | Top coordinate within source bitmap to copy
width | Width of the rectangle in pixels
height | Height of the rectangle in scanlines
dstLeft | Left coordinate of destination
dstTop | Top coordinate of destination
mix | Mix code for the copy (GA_mixCodesType)

Description

This routine will copy a bitmap from video memory to system memory with a starting address of dstPhysAddr from the source rectangle (srcLeft, srcTop, srcLeft+width-1, srcTop+height-1). The dstPhysAddr value points to the start of the destination bitmap data in system memory as a physical memory address, not a linear memory address that the application software normally deals with. It is up to the calling application to use the necessary OS services to allocate a block of contiguous physical memory for the bitmap data, and to obtain the physical memory address to be passed into this function.

Note: This function is only implemented for hardware that can do bus master reads over the PCI bus, and may be significantly faster than code that simply does direct reads over the PCI bus. Note that this function may return before the bus master operation has completed, and the application code should call the WaitTillIdle function to determine when the bus master operation has completed before using the data in the destination bitmap buffer.

See Also

BitBlt, WaitTillIdle, GetBitmapSys

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com