# Native Function Reference

## Building Bridge Applications

The easiest way to build an application using the new Bridge SDK is to link against the headers and dynamic libraries included in the Bridge installation. Bridge installs header files and libraries alongside the driver executable. The default install locations are listed below for Bridge version 2.4.10.

**MacOS**

* Headers: `/Applications/Looking Glass Bridge 2.4.10.app/Contents/runtime`
* Libraries: `/Applications/Looking Glass Bridge 2.4.10.app/Contents/MacOS`

**Windows**

* Headers: `C:\Program Files\Looking Glass\Looking Glass Bridge 2.4.10\runtime`
* Libraries: `C:\Program Files\Looking Glass\Looking Glass Bridge 2.4.10`

Update your project build settings to use a compiler include directive for the headers and a library search path for the libraries. The libraries may be safely copied into a project and distributed with an application as well.&#x20;

The `bridge.h` header exposes C functions and a C++ wrapper class to access Bridge SDK functionality. The C++ wrapper is even capable of searching for the Bridge dynamic libraries installed on host computers. The native function reference below is a complete list of functions in the SDK.

## Lifecycle Functions

The lifecycle functions are generally required for a normal [native application integration](https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/integrating-native-applications).&#x20;

### initialize\_bridge

```c
bool initialize_bridge(const char *app_name);
```

This function initializes the Bridge thread and allocates required resources.

#### Parameters

**app\_name** - the C-string name to associate with this application instance

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="warning" %}
**Note:** This function must be called *prior* to any other from the Bridge SDK.
{% endhint %}

#### See also

[uninitialize\_bridge](#uninitialize_bridge)

***

### uninitialize\_bridge

```c
bool uninitialize_bridge();
```

This function uninitializes the Bridge thread and deallocates required resources.

#### Returns

always returns TRUE

#### See also

[initialize\_bridge](#initialize_bridge)

### instance\_window\_gl

```c
bool instance_window_gl(WINDOW_HANDLE *wnd, 
                        unsigned long display_index = -1);
```

Creates a new window using display parameters.&#x20;

If the `display_index` parameter is not supplied, the Bridge SDK will search for the first display that matches a Looking Glass product and use that. The window position and size will match the selected display.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**display\_index** - the optional index of the display to configure the window for. A value of `-1` will select the first available Looking Glass display.

#### Returns

TRUE when a window was created, FALSE otherwise

{% hint style="info" %}
**Note:** The window created is meant for use with OpenGL texture sharing
{% endhint %}

#### See also

[instance\_offscreen\_window](#instance_offscreen_window)

### instance\_offscreen\_window

```c
bool instance_offscreen_window(WINDOW_HANDLE *wnd, 
                               unsigned long width,
                               unsigned long height,
                               const wchar_t* calibration_path);
```

Creates a new window using the input parameters.

The window `width` and `height` will match in the input parameters. The calibration parameters will be loaded from the input `calibration_path` parameter. This function is meant for automated rendering and does not require a display.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**width** - the desired width of the new window

**height** - the desired height of the new window

**calibration\_path** - the filesystem path for a Looking Glass calibration file

#### Returns

TRUE when a window was created, FALSE otherwise

#### See also

[instance\_window\_gl](#instance_window_gl)

***

### draw\_interop\_quilt\_texture\_gl

```c
bool draw_interop_quilt_texture_gl(WINDOW_HANDLE wnd, 
                                   unsigned long long texture, 
                                   PixelFormats format, 
                                   unsigned long width, 
                                   unsigned long height, 
                                   unsigned long vx, 
                                   unsigned long vy, 
                                   float aspect, 
                                   float zoom);
```

Triggers the Looking Glass optical transformation as a rendering post-processing step.&#x20;

The texture `width` and `height` values may not be larger than the width and height values returned from [get\_max\_texture\_size](#get_max_texture_size). This function designates the input texture as the source of quilt views for which the optical transformation will be applied.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**texture** - the texture handle to be shared between rendering contexts

**format** - the pixel format of the supplied texture

**width** - the width of the supplied texture

**height** - the height of the supplied texture

**vx** - the horizontal count of quilt views (columns) rendered to the texture

**vy** - the vertical count of quilt views (rows) rendered to the texture

**aspect** - the aspect ratio of the views

**zoom** - the optional zoom to be applied

#### Returns

FALSE for invalid configurations, TRUE otherwise

***

## Utility Functions

The utility functions are useful for handling operations like converting an RGBD asset to a Quilt asset or saving framebuffer textures to files for debugging purposes.

### get\_displays

```c
bool get_displays(int* number_of_indices, unsigned long* indices);
```

Returns the display indices attached to the host.&#x20;

The caller is responsible for allocating the array of index values To get the array size, this function should be called twice. When called with the `indices` parameter set to `nullptr`, it will return the size of the indices array. When called with the `indices` parameter set to an array pointer, the display indices will be copied into the supplied array up to a limit supplied by `number_of_indices`.

#### Parameters

**number\_of\_indices** - the pointer to the returned size of the index array

**indices** - the pointer to the returned array of display indices

#### Returns

FALSE if number\_of\_indices is null, TRUE otherwise

***

### get\_bridge\_version

```c
bool get_bridge_version(unsigned long* major, 
                        unsigned long *minor,
                        unsigned long* build,
                        int* number_of_postfix_wchars,
                        wchar_t* postfix);
```

This function queries the Bridge SDK to get the version number.&#x20;

The caller is responsible for allocating the postfix C-string buffer. To get the buffer size, this function should be called twice. When called with the `postfix` parameter set to nullptr, it will return the size of the postfix string.&#x20;

When called with the `postfix` parameter set to a buffer pointer, the build hash postfix will be copied into the supplied buffer up to the length of characters specified in the `number_of_postfix_wchars` parameter.

#### Parameters

**major** - the pointer to the returned numeral representing the major version

**minor** - the pointer to the returned numeral representing the minor version

**build** - the pointer to the returned numeral representing the build (or patch) version

**number\_of\_postfix\_wchars** - the pointer to the length of characters in the version postfix string

**postfix** - the pointer to the version postfix string

#### Returns

The semantic version of Bridge with build commit hash

***

### get\_display\_for\_window

```c
bool get_display_for_window(WINDOW_HANDLE wnd, unsigned long* display_index);
```

Returns the display index used to render the window.&#x20;

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**display\_index** - the zero-based index of the display

#### Returns

TRUE if successful, FALSE otherwise

***

### get\_max\_texture\_size

```c
bool get_max_texture_size(WINDOW_HANDLE wnd, unsigned long* size);
```

returns the maximum texture size for rendering to the window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**size** - the pointer to the returned texture size

#### Returns

the maximum texture size dimension to be used for rendering to the window

#### See also

[draw\_interop\_quilt\_texture\_gl](#draw_interop_quilt_texture_gl)

***

### show\_window

```c
bool show_window(WINDOW_HANDLE wnd, bool flag);
```

shows or hides the rending window based upon the input flag

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**flag** - the toggle to show or hide the window: FALSE=hide, TRUE=show

#### Returns

FALSE for an invalid window, TRUE otherwise

***

### quiltify\_rgbd

```c
bool quiltify_rgbd(WINDOW_HANDLE wnd, 
                   unsigned long columns, 
                   unsigned long rows, 
                   unsigned long views, 
                   float aspect, 
                   float zoom, 
                   float cam_dist, 
                   float fov, 
                   float crop_pos_x, 
                   float crop_pos_y, 
                   unsigned long depth_inversion, 
                   unsigned long chroma_depth, 
                   unsigned long depth_loc, 
                   float depthiness, 
                   float depth_cutoff, 
                   float focus, 
                   const wchar_t* input_path, 
                   const wchar_t* output_path);
```

Converts an RGBD image into a quilt image using input parameters

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**columns** - the desired output quilt columns

**rows** - the desired output quilt rows

**views** - the desired total number of views

**aspect** - the aspect ratio of the resulting quilt

**zoom** - the zoom applied to the RGBD input

**cam\_dist** - the camera distance applied during RGBD rendering

**fov** - the field of view applied during RGBD rendering

**crop\_pos\_x** - the x coordinate offset applied during RGBD rendering

**crop\_pos\_y** - the y coordinate offset applied during RGBD rendering

**depth\_inversion** - a toggle to invert the depth map: 0=FALSE, 1=TRUE

**chroma\_depth** - a toggle to interpret the depth map using a full color spectrum: 0=FALSE, 1=TRUE

**depth\_loc** - the location of the depth map within the image: 0=top, 1=bottom, 2=right, 3=left

**depthiness** - the amount of z-scaling applied to the RGBD input

**depth\_cutoff** - a z-depth threshold value applied to the RGBD input

**focus** - the z-depth value representing the focal plane of the resulting quilt

**input\_path** - the local filesystem path to the input RGBD image

**output\_path** - the local filesystem path for the desired output quilt image

#### Returns

TRUE when successful, FALSE otherwise

### save\_texture\_to\_file\_gl

```c
bool save_texture_to_file_gl(WINDOW_HANDLE wnd, 
                             char* filename,
                             unsigned long long texture,
                             PixelFormats format,
                             unsigned long width,
                             unsigned long height);
```

saves the input OpenGL texture to a file

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**filename** - the filesystem path for the saved image

**texture** - the texture handle to be saved to disk

**format** - the pixel format of the supplied texture

**width** - the width of the supplied texture

**height** - the height of the supplied texture

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[save\_image\_to\_file](#save_image_to_file)

***

### save\_image\_to\_file

```c
bool save_image_to_file(WINDOW_HANDLE wnd, 
                        char* filename, 
                        void* image,
                        PixelFormats format,
                        unsigned long width,
                        unsigned long height);
```

saves the raw image buffer to a file

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**filename** - the filesystem path for the saved image

**image** - the raw image buffer to be saved

**format** - the pixel format of the supplied image

**width** - the width of the supplied image

**height** - the height of the supplied image

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[save\_texture\_to\_file\_gl](#save_texture_to_file_gl)

***

## Window Query Functions

The following functions assume that a Looking Glass window was created for a connected Looking Glass display using [instance\_window\_gl](#instance_window_gl). This window is a required input parameter for getting additional device info.

The legacy Looking Glass Core SDK assumed that only a single Looking Glass device would be used. If multiple devices are connected to a computer then it was quite difficult to render to them both simultaneously. The new Bridge SDK provides support for developers using multiple Looking Glass displays and for easily exporting images rendered using 3rd party engines.

### get\_window\_dimensions

```c
bool get_window_dimensions(WINDOW_HANDLE wnd, 
                           unsigned long* width, 
                           unsigned long* height);
```

returns with size dimensions of the input window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**width** - the pointer to the returned width value

**height** - the pointer to the returned height value

#### Returns

width and height for the input window

#### See also

[get\_window\_position](#get_window_position)

[get\_dimensions\_for\_display](#get_dimensions_for_display)

***

### get\_window\_position

```c
bool get_window_position(WINDOW_HANDLE wnd, long* x, long* y);
```

returns with position of the input window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**x** - the pointer to the returned x coordinate value

**y** - the pointer to the returned y coordinate value

#### Returns

the x and y coordinates for the input window

#### See also

[get\_window\_dimensions](#get_window_dimensions)

***

### get\_calibration

```c
bool get_calibration(WINDOW_HANDLE wnd,
	             float* center,
	             float *pitch,
	             float *slope,
	             int* width,
	             int* height,
	             float* dpi,
	             float* flip_x,
	             int *invView,
	             float *viewcone,
	             float *fringe,
	             int* cell_pattern_mode,
	             int* number_of_cells,
	             CalibrationSubpixelCell* cells);
```

Returns the calibration values for the given window.&#x20;

The calibration parameters assocaited with the input window will be returned as parameter values. If the `cells` pointer is null, it will be ignored. Any other parameters with null values will be considered invalid.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**center** - the pointer to the returned center value

**pitch** - the pointer to the returned pitch value

**slope** - the pointer to the returned slope value

**width** - the pointer to the returned width value

**height** - the pointer to the returned height value

**dpi** - the pointer to the returned DPI value

**flip\_x** - the pointer to the returned horizontal flip toggle. 0=FALSE, 1=TRUE

**invView** - the pointer to the returned inverted views toggle. 0=FALSE, 1=TRUE

**viewcone** - the pointer to the returned viewcone value

**fringe** - the pointer to the returned fringe value

**cell\_pattern\_mode** - the pointer to the returned cell pattern mode

**number\_of\_cells** - the pointer to the returned cell count

**cells** - the pointer to the returned cell pattern struct

#### Returns

FALSE for invalid input parameters, TRUE otherwise

#### See also

[get\_calibration\_for\_display](#get_calibration_for_display)

***

### get\_device\_name

```c
bool get_device_name(WINDOW_HANDLE wnd, 
                     int* number_of_device_name_wchars, 
                     wchar_t* device_name);
```

Returns the device name for the given window.&#x20;

The caller is responsible for allocating the `device_name` C-string buffer. To get the buffer size, this function should be called twice. When called with the `device_name` parameter set to `nullptr`, it will return the size of the `device_name` string.&#x20;

When called with the `device_name` parameter set to a buffer pointer, the device name will be copied into the supplied buffer up to the length of characters specified in the `number_of_device_name_wchars` parameter.

The size of the buffer is returned as a count of wide string characters. In practice, wchar is 32 bits on Linux and MacOS but 16 bits on Windows.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**number\_of\_device\_name\_wchars** - the pointer to the returned size of the C-string buffer

**device\_name** - the pointer to the returned size device name C-string buffer

#### Returns

FALSE if number\_of\_device\_name\_wchars is null, TRUE otherwise

#### See also

[get\_device\_name\_for\_display](#get_device_name_for_display)

***

### get\_device\_serial

```c
bool get_device_serial(WINDOW_HANDLE wnd, 
                       int* number_of_serial_wchars, 
                       wchar_t* serial);
```

Returns the device serial number for the given window.&#x20;

The caller is responsible for allocating the serial number C-string buffer. To get the buffer size, this function should be called twice. When called with the `serial` parameter set to nullptr, it will return the size of the serial string.&#x20;

When called with the `serial` parameter set to a buffer pointer, the device serial will be copied into the supplied buffer up to the length of characters specified in the `number_of_serial_wchars` parameter.

The size of the buffer is returned as a count of wide string characters. In practice, wchar is 32 bits on Linux and MacOS but 16 bits on Windows.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**number\_of\_serial\_wchars** - the pointer to the returned size of the C-string buffer

**serial** - the pointer to the returned size device serial C-string buffer

#### Returns

FALSE if number\_of\_serial\_wchars is null, TRUE otherwise

#### See also

[get\_device\_serial\_for\_display](#get_device_serial_for_display)

***

### get\_default\_quilt\_settings

```c
bool get_default_quilt_settings(WINDOW_HANDLE wnd, 
                                float* aspect, 
                                int* quilt_width, 
                                int* quilt_height, 
                                int* quilt_columns, 
                                int* quilt_rows);
```

Returns the ideal quilt settings for the given window. The ideal quilt settings are aset of heuristics defined by Looking Glass for each display product.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**aspect** - the pointer to the returned aspect value

**quilt\_width** - the pointer to the returned width value

**quilt\_height** - the pointer to the returned height value

**quilt\_columns** - the pointer to the returned quilt columns value

**quilt\_rows** - the pointer to the returned quilt rows value

#### Returns

FALSE if number\_of\_serial\_wchars is null, TRUE otherwise

#### See also

[get\_default\_quilt\_settings\_for\_display](#get_default_quilt_settings_for_display)

***

### get\_device\_type

```c
bool get_device_type(WINDOW_HANDLE wnd, int* hw_enum);
```

returns the type of display product to render the window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**hw\_enum** - the display enum value

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_device\_type\_for\_display](#get_device_type_for_display)

***

### get\_viewcone

```c
bool get_viewcone(WINDOW_HANDLE wnd, float* viewcone);
```

returns the viewcone value for the display product that renders the window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**viewcone** - the pointer to the returned viewcone value

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_viewcone\_for\_display](#get_viewcone_for_display)

***

### get\_invview

```c
bool get_invview(WINDOW_HANDLE wnd, int* invview);
```

returns the inverted views toggle for the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**invview** - the pointer to the returned inverted views toggle. 0=FALSE, 1=TRUE

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_calibration](#get_calibration)

***

### get\_ri

```c
bool get_ri(WINDOW_HANDLE wnd, int* ri);
```

returns the red index for the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**ri** - the pointer to the returned red index value (0 or 2)

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_bi

```c
bool get_bi(WINDOW_HANDLE wnd, int *bi);
```

Returns the blue index for the display used with the given window.

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**bi** - the pointer to the returned blue index value (0 or 2)

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_tilt

```c
bool get_tilt(WINDOW_HANDLE wnd, float* tilt);
```

returns the tilt for the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**tilt** - the pointer to the returned tilt value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_displayaspect

```c
bool get_displayaspect(WINDOW_HANDLE wnd, float* displayaspect);
```

returns the aspect ratio of the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**displayaspect** - the pointer to the returned aspect ratio

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_fringe

```c
bool get_fringe(WINDOW_HANDLE wnd, float* fringe);
```

returns the fringe value of the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**fringe** - the pointer to the returned fringe value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_subp

```c
bool get_subp(WINDOW_HANDLE wnd, float* subp);
```

returns the subpixel size of the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**subp** - the pointer to the returned sub pixel size value

#### Returns

TRUE if successful, FALSE otherwise

***

### get\_pitch

```c
bool get_pitch(WINDOW_HANDLE wnd, float* pitch);
```

returns the pitch of the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**pitch** - the pointer to the returned pitch value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

### get\_center

```c
bool get_center(WINDOW_HANDLE wnd, float* center);
```

returns the center of the display used with the given window

#### Parameters

**wnd** - the pointer used to store the platform-specific window handle

**center** - the pointer to the returned center value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_calibration](#get_calibration)

***

## Display Query Functions

The following functions require a display index parameter which corresponds to an index returned from the [get\_displays](#get_displays) function. These functions may be called before any window is created to allow a developer to select a specific Looking Glass device if multiple devices are connected.

### get\_device\_name\_for\_display

```c
bool get_device_name_for_display(unsigned long display_index, 
                                 int* number_of_device_name_wchars, 
                                 wchar_t* device_name);
```

Returns the device name for the given display index.

The caller is responsible for allocating the `device_name` C-string buffer. To get the buffer size, this function should be called twice. When called with the `device_name` parameter set to `nullptr`, it will return the size of the `device_name` string.&#x20;

When called with the `device_name` parameter set to a buffer pointer, the device name will be copied into the supplied buffer up to the length of characters specified in the `number_of_device_name_wchars` parameter.

The size of the buffer is returned as a count of wide string characters. In practice, wchar is 32 bits on Linux and MacOS but 16 bits on Windows.

#### Parameters

**display\_index** - the index for the target Looking Glass display

**number\_of\_device\_name\_wchars** - the pointer to the returned size of the C-string buffer

**device\_name** - the pointer to the returned size device name C-string buffer

#### Returns

FALSE if number\_of\_device\_name\_wchars is null, TRUE otherwise

#### See also

[get\_device\_name](#get_device_name)

[get\_displays](#get_displays)

***

### get\_device\_serial\_for\_display

```c
bool get_device_serial_for_display(unsigned long display_index, 
                                   int* number_of_serial_wchars, 
                                   wchar_t* serial);
```

Returns the device serial number for the given display index.

The caller is responsible for allocating the serial number C-string buffer. To get the buffer size, this function should be called twice. When called with the `serial` parameter set to nullptr, it will return the size of the serial string.&#x20;

When called with the `serial` parameter set to a buffer pointer, the device serial will be copied into the supplied buffer up to the length of characters specified in the `number_of_serial_wchars` parameter.

The size of the buffer is returned as a count of wide string characters. In practice, wchar is 32 bits on Linux and MacOS but 16 bits on Windows.

#### Parameters

**display\_index** - the index for the target Looking Glass display

**number\_of\_serial\_wchars** - the pointer to the returned size of the C-string buffer

**serial** - the pointer to the returned size device serial C-string buffer

#### Returns

FALSE if number\_of\_serial\_wchars is null, TRUE otherwise

#### See also

[get\_device\_serial](#get_device_serial)

[get\_displays](#get_displays)

***

### get\_dimensions\_for\_display

```c
bool get_dimensions_for_display(unsigned long display_index, 
                                unsigned long* width, 
                                unsigned long* height);
```

returns with size dimensions of the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**width** - the pointer to the returned width value

**height** - the pointer to the returned height value

#### Returns

width and height for the input window

#### See also

[get\_window\_dimensions](#get_window_dimensions)

[get\_displays](#get_displays)

***

### get\_window\_position\_for\_display

```c
bool get_window_position_for_display(unsigned long display_index, long* x, long* y);
```

returns with position of the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**x** - the pointer to the returned x coordinate value

**y** - the pointer to the returned y coordinate value

#### Returns

the x and y coordinates for the input window

#### See also

[get\_window\_position](#get_window_position)

[get\_displays](#get_displays)

***

### get\_device\_type\_for\_display

```c
bool get_device_type_for_display(unsigned long display_index, int* hw_enum);
```

returns the type of display product for the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**hw\_enum** - the display enum value

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_device\_type](#get_device_type)

***

### get\_calibration\_for\_display

```c
bool get_calibration_for_display(unsigned long display_index,
			         float* center,
			         float *pitch,
			         float *slope,
			         int* width,
			         int* height,
			         float* dpi,
			         float* flip_x,
			         int* invView,
			         float* viewcone,
			         float* fringe,
			         int* cell_pattern_mode,
			         int* number_of_cells,
			         CalibrationSubpixelCell* cells);
```

returns the calibration values for the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**center** - the pointer to the returned center value

**pitch** - the pointer to the returned pitch value

**slope** - the pointer to the returned slope value

**width** - the pointer to the returned width value

**height** - the pointer to the returned height value

**dpi** - the pointer to the returned DPI value

**flip\_x** - the pointer to the returned horizontal flip toggle. 0=FALSE, 1=TRUE

**invView** - the pointer to the returned inverted views toggle. 0=FALSE, 1=TRUE

**viewcone** - the pointer to the returned viewcone value

**fringe** - the pointer to the returned fringe value

**cell\_pattern\_mode** - the pointer to the returned cell pattern mode

**number\_of\_cells** - the pointer to the returned cell count

**cells** - the pointer to the returned cell pattern struct

#### Returns

FALSE for invalid input parameters, TRUE otherwise

#### See also

[get\_calibration](#get_calibration)

[get\_displays](#get_displays)

***

### get\_invview\_for\_display

```c
bool get_invview_for_display(unsigned long display_index, int* invview);
```

returns the inverted views toggle for the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**invview** - the pointer to the returned inverted views toggle. 0=FALSE, 1=TRUE

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_invview](#get_invview)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_ri\_for\_display

```c
bool get_ri_for_display(unsigned long display_index, int* ri);
```

returns the red index for the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**ri** - the pointer to the returned red index value (0 or 2)

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_ri](#get_ri)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_bi\_for\_display

```c
bool get_bi_for_display(unsigned long display_index, int *bi);
```

returns the blue index for the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**bi** - the pointer to the returned blue index value (0 or 2)

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_bi](#get_bi)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_tilt\_for\_display

```c
bool get_tilt_for_display(unsigned long display_index, float* tilt);
```

returns the tilt for the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**tilt** - the pointer to the returned tilt value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_tilt](#get_tilt)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_displayaspect\_for\_display

```c
bool get_displayaspect_for_display(unsigned long display_index, float* displayaspect);
```

returns the aspect ratio of the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**displayaspect** - the pointer to the returned aspect ratio

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
**Note:** This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_displayaspect](#get_displayaspect)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_fringe\_for\_display

```c
bool get_fringe_for_display(unsigned long display_index, float* fringe);
```

returns the fringe value of the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**fringe** - the pointer to the returned fringe value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
Note: this function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_fringe](#get_fringe)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_subp\_for\_display

```c
bool get_subp_for_display(unsigned long display_index, float* subp);
```

returns the subpixel size of the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**subp** - the pointer to the returned sub pixel size value

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_subp](#get_subp)

***

### get\_viewcone\_for\_display

```c
bool get_viewcone_for_display(unsigned long display_index, float* viewcone);
```

returns the viewcone value for the display product with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**viewcone** - the pointer to the returned viewcone value

#### Returns

TRUE if successful, FALSE otherwise

#### See also

[get\_viewcone](#get_viewcone)

***

### get\_pitch\_for\_display

```c
bool get_pitch_for_display(unsigned long display_index, float* pitch);
```

returns the pitch of the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**pitch** - the pointer to the returned pitch value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
Note: This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_pitch](#get_pitch)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_center\_for\_display

```c
bool get_center_for_display(unsigned long display_index, float* center);
```

returns the center of the display used with the given display index

#### Parameters

**display\_index** - the index for the target Looking Glass display

**center** - the pointer to the returned center value

#### Returns

TRUE if successful, FALSE otherwise

{% hint style="info" %}
Note: This function is meant only to provide compatibility with HoloPlay Core SDK
{% endhint %}

#### See also

[get\_center](#get_center)

[get\_calibration\_for\_display](#get_calibration_for_display)

[get\_displays](#get_displays)

***

### get\_default\_quilt\_settings\_for\_display

```c
bool get_default_quilt_settings_for_display(unsigned long display_index, 
                                            float* aspect,
                                            int* quilt_width,
                                            int* quilt_height,
                                            int* quilt_columns,
                                            int* quilt_rows);
```

Returns the ideal quilt settings for the given display index. The ideal quilt settings are aset of heuristics defined by Looking Glass for each display product.

#### Parameters

**display\_index** - the index for the target Looking Glass display

**aspect** - the pointer to the returned aspect value

**quilt\_width** - the pointer to the returned width value

**quilt\_height** - the pointer to the returned height value

**quilt\_columns** - the pointer to the returned quilt columns value

**quilt\_rows** - the pointer to the returned quilt rows value

#### Returns

FALSE if number\_of\_serial\_wchars is null, TRUE otherwise

#### See also

[get\_default\_quilt\_settings](#get_default_quilt_settings)
