github.com/tbogdala/openvr-go

golang wrapper of Valve's OpenVR library


License
BSD-2-Clause
Install
go get github.com/tbogdala/openvr-go

Documentation

Openvr-go v0.1.0

Openvr-go is an Go programming language wrapper for the OpenVR SDK published by Valve for VR hardware.

basiccube

UNDER CONSTRUCTION

At present, it is very much in an alpha stage with new development happening to complete the API exposed by the OpenVR SDK.

Requirements

The wrapper library itself doesn't have any dependencies. The connectiontest sample in the examples folder also doesn't have any dependencies.

The other samples are graphical and use the following libraries, though they are not imported by the core openvr-go module itself:

  • Mathgl - for 3d math
  • GLFW (v3.1) - creating windows and providing the OpenGL context
  • Fizzle - provides the graphics engine
  • Go GL - provides the backend implementation of OpenGL for Fizzle.

Installation

The dependency Go libraries for graphical examples can be installed with the following commands.

go get github.com/go-gl/glfw/v3.1/glfw
go get github.com/go-gl/mathgl/mgl32
go get github.com/go-gl/gl/v3.3-core/gl
go get github.com/tbogdala/fizzle

This does assume that you have the native GLFW 3.1 library installed already accessible to Go tools.

Additionally, the appropriate openvr_api.dll or libopenvr_api.so file from vendor/openvr/bin/<platform> will either need to be copied into each example directory being built or it will need to be accessible system wide.

Each sample can be built by going to that directory in a shell and executing a go build command. For example:

cd $GOPATH/src/github.com/tbogdala/openvr-go/examples/basiccube
go build
cp ../../vendor/openvr/bin/win64/openvr_api.dll .
./basiccube.exe

Current Features

Partial implementation of the following interfaces:

  • IVRSystem
  • IVRCompositor
  • IVRRenderModels

Implementation Notes

Some minor patches have been applied to the vendored openvr library version to better support linux.

LICENSE

Original source code in openvr-go is released under the BSD license. See the LICENSE file for more details.

Projects in the vendor folder may have their own LICENSE file.