Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PhDCRelease

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PhDCRelease

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

PhDCRelease()

Release a draw context

Synopsis:

int PhDCRelease( PhDrawContext_t *dc );

Library:

ph

Description:

This function releases the provided DC (the default Photon draw context can not be released). The context is notified of its pending demise before it's destroyed, so that it can do any necessary cleanup.


Note: You aren't likely to call this function directly unless you're releasing:
  • your own type of draw context
  • an offscreen context, created by calling PdCreateOffscreenContext(). If you've locked the context, call PdLockOffscreen() to unlock it before releasing the offscreen context.

The functions that release specific types of contexts (e.g. direct-mode, printer, and memory) call PhDCRelease().


Returns:

0
Success.
-1
An error occurred (most likely you're trying to release the Photon default DC).

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdReleaseDirectContext(), PdCreateOffscreenContext(), PhDCCreate(), PhDCGetCurrent(), PhDCSetCurrent(), PmMemReleaseMC(), PpReleasePC()

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


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

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026