pyo
pyopenxr
pypi i pyopenxr
pyo

pyopenxr

Unofficial python bindings for OpenXR access to VR and AR devices

by Christopher Bruns

1.0.2403 (see all)Categories:Vanilla Python Virtual Reality
pypi i pyopenxr
Readme

pyopenxr

Unofficial python bindings for the OpenXR SDK to access VR and AR devices

pyopenxr is a python developer SDK with features for device tracking and rapid virtual reality prototyping using the headset-agnostic OpenXR API.

hello_xr1

Installing pyopenxr

pip install pyopenxr

Using pyopenxr

import xr

# Query the available VR/AR extensions
available = xr.enumerate_instance_extension_properties()

# Replace with whatever extensions are required for your
# particular application...
required = [xr.KHR_OPENGL_ENABLE_EXTENSION_NAME, ]
for prop in required:
    assert prop in available

Study the complete working hello_xr.py example at https://github.com/cmbruns/pyopenxr_examples

Pythonic naming conventions in pyopenxr

symbolPython exampleC example
functionxr.create_instance(...)xrCreateInstance(...)
constantxr.MAX_SYSTEM_NAME_SIZEXR_MAX_SYSTEM_NAME_SIZE
struct namexr.ExtensionPropertiesXrExtensionProperties
type aliasxr.VersionXrVersion
enum typexr.FormFactorxrFormFactor
enum valuexr.FormFactor.HEAD_MOUNTED_DISPLAYXR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY
handlexr.InstanceXrInstance

GitHub Stars

32

LAST COMMIT

4mos ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

20

OPEN PRs

0
VersionTagPublished
1.0.2403
3d ago
1.0.2402
3d ago
1.0.2401
7d ago
1.0.2301
1mo ago
No tutorials found
Add a tutorial