PdSetTargetDevice
![]() |
![]() |
![]() |
![]() |
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:
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
“Video memory offscreen” in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
