mirror of https://github.com/bjornbytes/lovr.git
Documentation;
This commit is contained in:
parent
b3447f4af7
commit
8db1b1db06
66
README.md
66
README.md
|
@ -23,12 +23,12 @@ function lovr.draw(eye)
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
Drag the `myGame` folder onto a shortcut to `lovr.exe`. You should see a spinning purple cube! See instructions below on compiling `lovr.exe`.
|
Drag the `myGame` folder onto a shortcut to `lovr.exe`. You should see a spinning purple cube!
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
---
|
---
|
||||||
|
|
||||||
Some rough reference documentation exists in [API.md](doc/API.md).
|
Some basic reference documentation exists in [`API.md`](doc/API.md).
|
||||||
|
|
||||||
Supported Hardware
|
Supported Hardware
|
||||||
---
|
---
|
||||||
|
@ -40,64 +40,4 @@ Support for other hardware will happen eventually.
|
||||||
Compiling
|
Compiling
|
||||||
---
|
---
|
||||||
|
|
||||||
### Dependencies
|
See the [compilation guide](doc/COMPILING.md).
|
||||||
|
|
||||||
- LuaJIT
|
|
||||||
- GLFW (3.2+) and OpenGL (3.2+)
|
|
||||||
- assimp
|
|
||||||
- SteamVR (OpenVR)
|
|
||||||
|
|
||||||
### Windows (CMake)
|
|
||||||
|
|
||||||
- Install [lovr-deps](https://github.com/bjornbytes/lovr-deps):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd lovr
|
|
||||||
git clone --recursive https://github.com/bjornbytes/lovr-deps deps
|
|
||||||
```
|
|
||||||
|
|
||||||
Next, build using the CMake GUI or using the CMake command line.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ..
|
|
||||||
```
|
|
||||||
|
|
||||||
This should output a Visual Studio solution, which can be built using Visual Studio. Or you can just build it with CMake:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cmake --build .
|
|
||||||
```
|
|
||||||
|
|
||||||
The executable will then exist at `/path/to/lovr/build/Debug/lovr.exe`. The recommended way to create and run a game from this point is:
|
|
||||||
|
|
||||||
- Create a shortcut to the `lovr.exe` executable somewhere convenient.
|
|
||||||
- Create a folder for your game: `MySuperAwesomeGame`.
|
|
||||||
- Create a `main.lua` file in the folder and put your code in there.
|
|
||||||
- Drag the `MySuperAwesomeGame` folder onto the shortcut to `lovr.exe`.
|
|
||||||
|
|
||||||
### OSX (tup)
|
|
||||||
|
|
||||||
Used for development, not generally recommended.
|
|
||||||
|
|
||||||
One-time setup:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd lovr
|
|
||||||
git clone git@github.com:ValveSoftware/openvr ..
|
|
||||||
export DYLD_LIBRARY_PATH=`pwd`/../openvr/lib/osx32
|
|
||||||
brew install assimp glfw3 luajit
|
|
||||||
```
|
|
||||||
|
|
||||||
Compiling:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
tup
|
|
||||||
```
|
|
||||||
|
|
||||||
Running a game:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ ./lovr /path/to/game
|
|
||||||
```
|
|
||||||
|
|
|
@ -7,11 +7,12 @@ Dependencies
|
||||||
---
|
---
|
||||||
|
|
||||||
- LuaJIT
|
- LuaJIT
|
||||||
- GLFW (3.2+) and OpenGL (3.2+) and GLEW
|
- GLFW (3.2+)
|
||||||
- assimp (`lovr.model` and `lovr.graphics.newModel`)
|
- OpenGL (Unix) or GLEW (Windows)
|
||||||
- OpenVR (`lovr.headset`)
|
- assimp (for `lovr.model` and `lovr.graphics.newModel`)
|
||||||
|
- OpenVR (for `lovr.headset`)
|
||||||
|
|
||||||
Windows (Using CMake)
|
Windows (CMake)
|
||||||
---
|
---
|
||||||
|
|
||||||
First, install [lovr-deps](https://github.com/bjornbytes/lovr-deps):
|
First, install [lovr-deps](https://github.com/bjornbytes/lovr-deps):
|
||||||
|
@ -21,7 +22,7 @@ cd lovr
|
||||||
git clone --recursive https://github.com/bjornbytes/lovr-deps deps
|
git clone --recursive https://github.com/bjornbytes/lovr-deps deps
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, build using the CMake GUI or using the CMake command line.
|
Next, use CMake to generate the build files:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build
|
mkdir build
|
||||||
|
@ -44,27 +45,27 @@ create and run a game from this point is:
|
||||||
- Create a `main.lua` file in the folder and put your code in there.
|
- Create a `main.lua` file in the folder and put your code in there.
|
||||||
- Drag the `MySuperAwesomeGame` folder onto the shortcut to `lovr.exe`.
|
- Drag the `MySuperAwesomeGame` folder onto the shortcut to `lovr.exe`.
|
||||||
|
|
||||||
### OSX (tup)
|
Unix (CMake)
|
||||||
|
---
|
||||||
|
|
||||||
Used for development, not generally recommended.
|
First, clone [OpenVR](https://github.com/ValveSoftware/openvr).
|
||||||
|
Next, install the other dependencies above using your package manager of choice:
|
||||||
One-time setup:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd lovr
|
brew install assimp glfw3 luajit
|
||||||
git clone git@github.com:ValveSoftware/openvr ..
|
|
||||||
export DYLD_LIBRARY_PATH=`pwd`/../openvr/lib/osx32
|
|
||||||
brew install assimp glfw3 luajit tup
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Compiling:
|
Next, build using CMake:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
tup
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DOPENVR_DIR=/path/to/openvr
|
||||||
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
|
||||||
Running a game:
|
The `lovr` executable should exist in `lovr/build` now. You can run a game like this:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ./lovr /path/to/game
|
./lovr /path/to/myGame
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue