> For the complete documentation index, see [llms.txt](https://lfdocs.lookingglassfactory.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lfdocs.lookingglassfactory.com/legacy/legacy-software/core-sdk/index-1/index/device-query-functions.md).

# Device-Query-Functions

The following functions query per-device configuration parameters. They will return 0 if the device or calibration isn't found.

**Returns**

varies

**Args**

Device index.

A note on device indexing: HoloPlay Service assigns each connected device a persistent index, starting from 0. When a new device is connected, HoloPlay Service will assign it the lowest index available.

In certain situations, there may be no device present at a certain index. For instance, if two devices are connected, they will receive indices 0, then 1, respectively. If the device indexed 0 is disconnected, there will be a device present at index 1 but not at index 0. The next device to be connected will be assigned index 0.

## hpc\_GetDevicePropertyWinX

`int hpc_GetDevicePropertyWinX(int dev_index)`

**Returns**

X position of monitor, in window coordinates, reported by OS.

**Args**

Device Index

## hpc\_GetDevicePropertyWinY

`int hpc_GetDevicePropertyWinY(int dev_index)`

**Returns**

Y position of monitor, in window coordinates, reported by OS.

**Args**

Device Index

The following functions return values retrieved from the lenticular calibration file associated with the device and transmitted over USB. They should be loaded into the lenticular shader as uniform parameters of the same name and type.

## hpc\_GetDevicePropertyScreenW

`int hpc_GetDevicePropertyScreenW(int dev_index)`

**Returns**

Screen width in pixels.

**Args**

Device Index

## hpc\_GetDevicePropertyScreenH

`int hpc_GetDevicePropertyScreenH(int dev_index)`

**Returns**

Screen height in pixels.

**Args**

Device Index

## hpc\_GetDevicePropertyInvView

`int hpc_GetDevicePropertyInvView(int dev_index)`

**Returns**

Whether the lenticular shader should be inverted. (1 or 0)

**Args**

Device Index

## hpc\_GetDevicePropertyRi

`int hpc_GetDevicePropertyRi(int dev_index)`

**Returns**

'Red index' of each lenticular subpixel. (0 or 2)

**Args**

Device Index

## hpc\_GetDevicePropertyBi

`int hpc_GetDevicePropertyBi(int dev_index)`

**Returns**

'Blue index' of each lenticular subpixel. (0 or 2)

**Args**

Device Index

## hpc\_GetDevicePropertyPitch

`float hpc_GetDevicePropertyPitch(int dev_index)`

**Returns**

Lenticular lens pitch.

**Args**

Device Index

## hpc\_GetDevicePropertyCenter

`float hpc_GetDevicePropertyCenter(int dev_index)`

**Returns**

Lenticular center offset.

**Args**

Device Index

## hpc\_GetDevicePropertyTilt

`float hpc_GetDevicePropertyTilt(int dev_index)`

**Returns**

Lenticular tilt angle.

**Args**

Device Index

## hpc\_GetDevicePropertyAspect

`float hpc_GetDevicePropertyAspect(int dev_index)`

**Returns**

Display aspect ratio (Equal to ScreenW/ScreenH).

**Args**

Device Index

## hpc\_GetDevicePropertyFringe

`float hpc_GetDevicePropertyFringe(int dev_index)`

**Returns**

Display fringe correction uniform (currently only applicable to 15.6" Developer/Pro units).

**Args**

Device Index

## hpc\_GetDevicePropertySubp

`float hpc_GetDevicePropertySubp(int dev_index)`

**Returns**

Display subpixel size.

**Args**

Device Index


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lfdocs.lookingglassfactory.com/legacy/legacy-software/core-sdk/index-1/index/device-query-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
