ggiOvl2Buf

Name

ggiOvl2Buf -- Represent the data inside an overlay with a LibBuf object

Synopsis

#include <ggi/ovl.h>
#include <ggi/buf.h>

void *ggiOvl2Buf(ggiOvl_t Ovl);

Description

ggiOvl2Buf creates a LibBuf object corresponding to a LibOvl object. In order to keep the libraries separate on the API level, you must cast the returned void* pointer to a LibBuf ggiBuf_t yourself. For resources with data buffers, such as sprite bitmaps, the LibBuf_t object can be used as a lightweight mechanism (vs. opening a new visual with ggiOvl2Vis) to load data to/from the data buffer, or to create ancillary buffers for the overlay. For certain other resources, a LibBuf object may be useful for use-time (vs resource creation-time) configuration of Alpha blending rules, and other such features not accessible through ggiOvlSetFlags.

Return value

ggiOvl2Buf returns a void* pointer which must be cast to type ggiBuf_t, or NULL in the event of an error.