Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PdSetTargetDevice

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PdSetTargetDevice

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

PdSetTargetDevice()

Set the target device

Synopsis:

PhRid_t PdSetTargetDevice ( const void *dc,
                        PhRid_t device_rid );

Arguments:

dc
A void pointer to any type of draw context, or NULL for the current draw context. Examples of draw contexts are:
  • a PhDrawContext_t returned by PhDCCreate()
  • a PmMemoryContext_t returned by PmMemCreateMC()
  • a PpPrintContext_t returned by PpCreatePC()
  • a PdOffscreenContext_t returned by PdCreateOffscreenContext()
device_rid
The region ID of the device that you want to be the target. To get the region IDs for the currently available draw devices, call PdGetDevices().

Library:

ph

Description:

This function sets the device with the given region ID to be the target for device-specific queries and control operations in the given draw context. By default, the target is the screen.

You can target the following functions at specific cards:

  • PdCreateDirectContext()
  • PdCreateOffscreenContext()
  • PdDupOffscreenContext()
  • PdReleaseDirectContext()
  • PgGetGraphicsHWCaps()
  • PgGetPalette()
  • PgGetVideoMode()
  • PgGetVideoModeInfo()
  • PgGetVideoModeList()
  • PgReadScreen()
  • PgReadScreenSize()
  • PgSetVideoMode()
  • PgWaitDrawComplete()
  • PgWaitHWIdle()

Returns:

The region ID of the previously set device, or 0 if no device was set
Success.
-1
An error occurred.

Examples:

See PdCreateDirectContext().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdGetDevices()

"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