Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*.o
*.os
*.so
*.dylib
.import
*.import
*.dblite
*.exp
*.lib
*.obj
logs
builddir
subprojects/*
!subprojects/*.wrap
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
[submodule "godot_headers"]
path = godot_headers
url = https://github.com/GodotNativeTools/godot_headers
[submodule "OpenHMD"]
path = OpenHMD
url = https://github.com/OpenHMD/OpenHMD
[submodule "hidapi"]
path = hidapi
url = https://github.com/OpenHMD/hidapi
[submodule "libusb"]
path = libusb
url = https://github.com/libusb/libusb
10 changes: 10 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Contributors
============

This plugin has mostly been developed by [Bastiaan Olij](https://github.com/BastiaanOlij).

Other people who have helped out by submitting fixes, enhancements, etc are:
- [Douglas Xie](https://github.com/Douglas-3Glasses)
- [Joey](https://github.com/TheOnlyJoey)
- [Benedikt](https://github.com/beniwtv)
- [Jan Schmidt](https://github.com/thaytan)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Bastiaan Olij
Copyright (c) 2018-2020 Bastiaan Olij and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion OpenHMD
Submodule OpenHMD deleted from d337a1
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,31 @@ If you want to build this module for Godot 3.0 please checkout the 3.0 branch.

Building this module
--------------------
In order to compile this module you will have to clone the source code to disk. You will need a C/C++ compiler, python and scons installed. This is the same toolchain you will need in order to compile Godot from master. The documentation on Godot is a very good place to read up on this. It is too much information to duplicate here.
This module uses meson and ninja for building and dependency management.

When cloning this repository make sure you also install all the submodules.
You can find instructions for installing meson here: https://mesonbuild.com/Quick-guide.html

You can find instructions for installing ninja here: https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages

We do still use submodules to bring our `godot_headers` repository in.
Either clone with `git clone --recursive` or execute:
```
git submodules init
git submodules update
```
after cloning.

If you're pulling a newer version (re)execute the `git submodules update` command to make sure the modules are up to date. If you're interested in using different branches of the 3rd party modules just CD into their subfolder and you can execute git commands on those repositories.
If you're pulling a newer version (re)execute the `git submodules update` command to make sure the modules are up to date. If you're interested in using different branches of the 3rd party modules just CD into their subfolder and you can execute git commands on those repositories.

*Compiling*
If everything into place compiling should be pretty straight forward
```
meson builddir
cd builddir
ninja
```

For Linux: ```scons platform=linux```
For OSX: ```scons platform=osx```
For Windows: ```scons platform=windows```
Now copy `builddir\subprojects\hidapi\hidapi.dll`, `builddir\subprojects\OpenHMD\openhmd-0.dll` and `builddir\godot_openhmd-0.dll` into `demo\addons\godot-openhmd\bin\win64` (or equivelent step on other platforms), still looking into how to automate this.

License
-------
Expand All @@ -57,9 +64,9 @@ I'm leaving these instructions in the readme file because this is what we do wan

## X11 (Linux)

Clone this repository using `git clone --recursive` so all the needed packages will be cloned together with the source code.
Clone this repository using `git clone --recursive` so all the needed packages will be cloned together with the source code.

After that build libusb, openhmd and hidapi, using the following commands:
After that build libusb, openhmd and hidapi, using the following commands:

```
export CORES=$(grep processor /proc/cpuinfo | wc -l)
Expand All @@ -68,13 +75,13 @@ cd hidapi ; ./bootstrap ; ./configure ; make -j $CORES ; cd ..
cd OpenHMD ; ./autogen.sh ; ./configure ; make -j $CORES ; cd ..
```

To make things easier, set the `GODOT_ROOT` environment variable with the folder that holds the GODOT source code, for example, like this:
To make things easier, set the `GODOT_ROOT` environment variable with the folder that holds the GODOT source code, for example, like this:

```
export GODOT_ROOT=../godot.git
```

The you can build by issuing the followin command:
The you can build by issuing the followin command:

```GODOT_HEADERS=$GODOT_ROOT/modules/gdnative/include/ /bin/scons -j $CORES```

Expand All @@ -83,7 +90,7 @@ Last, you can test your build by issuing:
`$GODOT_ROOT/bin/godot.x11.tools.64 demo/project.godot`

or

`godot demo/project.godot`

## Windows
Expand Down
186 changes: 0 additions & 186 deletions SConstruct

This file was deleted.

1 change: 1 addition & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See CHANGES.md in `demo/addons/godot-openhmd` for change/version history
19 changes: 19 additions & 0 deletions demo/Box.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://assets/wahooney.itch.io/blue_grid.tres" type="Material" id=1]

[sub_resource type="CubeMesh" id=1]
material = ExtResource( 1 )
size = Vector3( 1, 1, 1 )

[sub_resource type="BoxShape" id=2]
extents = Vector3( 0.5, 0.5, 0.5 )

[node name="Box" type="RigidBody"]

[node name="MeshInstance" type="MeshInstance" parent="."]
mesh = SubResource( 1 )
material/0 = null

[node name="CollisionShape" type="CollisionShape" parent="."]
shape = SubResource( 2 )
1 change: 0 additions & 1 deletion demo/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func _ready():

# and tell our viewport to render
get_viewport().arvr = true



func _process(delta):
Expand Down
Loading