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

PdDupOffscreenContext()

Duplicate an offscreen context

Synopsis:

PdOffscreenContext_t *
    PdDupOffscreenContext(
        PdOffscreenContext_t *context,
        unsigned long flags );

Library:

ph

Description:

PdDupOffscreenContext() makes a copy of the given context. This not only creates a context that has the same dimensions and image type, but also copies the image data.

The context argument points to the context to be duplicated, or is NULL if you want to duplicate the screen buffer.


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

The flags define how the offscreen context is to be created. The following flags are supported:

Pg_OSC_CRTC_SAFE
Tell the driver to be sure that the context is created in an area to which the CRT can be pointed.
Pg_OSC_MEM_PAGE_ALIGN
Ensure that the offscreen context that's created is aligned to __PAGESIZE (4K on an x86). You need to specify this flag in order to use PdGetOffscreenContextPtr() with this context.

Returns:

A pointer to a PdOffscreenContext_t structure, or NULL on failure.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdCreateOffscreenContext(), PdGetOffscreenContextPtr(), PdOffscreenContext_t, PdSetOffscreenTranslation(), PdSetTargetDevice(), PgContextBlit(), PgSwapDisplay()

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


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