[Previous] [Contents] [Index] [Next]

PdCreateOffscreenContext()

Create an offscreen context in video RAM

Synopsis:

PdOffscreenContext_t *PdCreateOffscreenContext(
                         unsigned long ImageType,
                         unsigned short width,
                         unsigned short height, 
                         unsigned long flags );

Arguments:

ImageType
The type of image. This must currently be 0; the image type is defined by the current video mode.
width, height
The dimensions of the context, in pixels.
flags
Additional parameters to be used in the creation of the context:

Library:

ph

Description:

This function creates an offscreen context in video RAM.


Note: You must target this function at a specific card by calling PdSetTargetDevice(). PdCreateOffscreenContext() blocks until the operation is complete.

If there isn't enough space in video RAM to create the offscreen context, the behavior of this function depends on the driver; most drivers allocate space in system memory instead.

Returns:

A pointer to a PdOffscreenContext_t, or NULL if an error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdDupOffscreenContext(), PdGetOffscreenContextPtr(), PdOffscreenContext_t, PdSetOffscreenTranslation(), PdSetTargetDevice(), PgContextBlit(), PgSwapDisplay(), PhDCCreate(), PhDCRelease()

"Video memory offscreen" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


[Previous] [Contents] [Index] [Next]