MGL_lockBuffer
Lock a buffer to begin direct surface access
Declaration
ulong MGLAPI MGL_lockBuffer(
MGLBUF *buf)
Prototype In
mgraph.h
Parameters
buf |
MGL buffer to lock |
Return Value
Physical address of locked buffer in memory, 0 if a system memory buffer.
Description
This function locks a buffer so that an application can begin drawing directly on the surface memory. You must call this function before you draw directly on the bitmap surface!
The return value from this function is the physical start address of the buffer in memory, which can be used to program DMA operations from other hardware devices directly into the video memory for the buffer. This is useful for frame grabber devices so that the resulting frame from the frame grabber device can be blitted to the visual display as quickly as possible (much quicker than if it was DMA'ed into system memory).
If the buffer is a system memory buffer, the return value from this function will be 0, since we cannot obtain the physical starting address of a system memory buffer.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com