Integrating Native Applications
Bring support for the Looking Glass display to your application
Last updated
Bring support for the Looking Glass display to your application
Last updated
Integrating with the Bridge SDK consists of five steps:
Configure a shared GPU rendering context
Initialize Bridge to spawn a post-processing thread and allocate resources
Create a Looking Glass window using the shared rendering context
Render views of a 3D scene into a framebuffer object
Trigger the Bridge post-processing step with the framebuffer object
This method of integration works for all Looking Glass displays. It is supported on Windows and MacOS using OpenGL. It is supported on Windows using DirectX 11 and 12. It is supported on MacOS using Metal. This method will apply a special transformation function that will map each diode on the Looking Glass display to the correct color corresponding to the direction of light emitted from the diode. This was previously the responsibility of the developer using HoloPlay Core. This example will demonstrate the aforementioned steps using OpenGL.
The first step is to configure a GPU rendering context. This example code uses GLFW with GLAD:
The second step is to initialize Bridge. This step is required before calling any other Bridge functions.
The third step is to create a window that can be used to render to a Looking Glass display.
The fourth step is to render a 3D scene into a framebuffer object using a quilt layout.
The fifth and last step consists of trigger the post-processing shader pipeline necessary to apply the Looking Glass optical transformation.
Note: Upon termination the application should also call uninitialize_bridge
when deallocating any other resources used by the program.