Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

HmdDevice - QML plugin for HMD device using OpenHMD

Usage:

HmdDevice is intended to be used with Qt3D. HmdEye is mapped to a camera and viewport.

import openhmd 1.0

Item {
    HmdDevice {
        id: headset
        updateRate: 60
    }

    HmdEye {
        hmdDevice: headset
        eye: HmdEye.Left
        camera: cameraLeft
    }

    HmdEye {
        hmdDevice: headset
        eye: HmdEye.Right
        camera: cameraRight
    }

    ...
}

The RenderSettings for the scene with two viewports would look something like this:


...
RenderSettings {
    activeFrameGraph: RenderSurfaceSelector {
        Viewport {
            normalizedRect: Qt.rect(0, 0, 1, 1)
        }
        ClearBuffers {
            buffers: ClearBuffers.ColorDepthBuffer
            clearColor: Qt.rgba(0.0, 0.0, 0.0, 0.0)
        }
        Viewport {
            id: left
            nomralizedRect: Qt.rect(0, 0, 0.5, 1)
            CameraSelector {
                camera: Camera {
                    id: cameraLeft
                }
            }
        }
        Viewport {
            id: right
            nomralizedRect: Qt.rect(0.5, 0, 0.5, 1)
            CameraSelector {
                camera: Camera {
                    id: cameraRight
                }
            }
        }
    }
}

About

QML plugin for HMD device using OpenHMD

Resources

Releases

No releases published

Packages

No packages published