SetDrawBuffer
Sets the software rasteriser active drawing buffer.
Declaration
N_int32 NAPI REF2D_driver::SetDrawBuffer(
GA_buffer *drawBuf,
void *framebuffer,
N_int32 bitsPerPixel,
GA_pixelFormat *pf,
GA_devCtx *hwCtx,
N_int32 softwareOnly)
Prototype In
snap/ref2d.h
Parameters
drawBuf |
Buffer to make the active drawing buffer |
framebuffer |
Pointer to the start of frameBuffer memory |
bitsPerPixel |
Color depth for the buffer |
pf |
Pixel format for the buffer |
hwCtx |
SNAP driver to use (NULL if none) |
softwareOnly |
True to force software only mode |
Return Value
0 on success, -1 on failure.
Description
This function allows the application to make a video memory or system memory buffer the active rendering buffer for all subsequent drawing commands for the 2d reference rasteriser. This function mimics SetDrawBuffer, however it also allows the software rasteriser to be pointed at a system memory buffer for drawing without any hardware acceleration at all.
If the hwCtx parameter is set to NULL, this function will enable only software rendering to a system memory buffer pointed to by the frameBuffer pointer. If the hwCtx member is not NULL and the frameBuffer pointer points to a located in video memory, hardware acceleration will be enabled when possible (provided softwareOnly is also set to false). If the softwareOnly flag is true, no hardware rendering will be used at all.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com