Skip to content
Snippets Groups Projects
Commit 4bd7af35 authored by Pete Black's avatar Pete Black
Browse files

Merge branch 'master' of gitlab.freedesktop.org:monado/monado into mesh_distortion

parents 19c37b44 4540cff0
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ and aims to support other operating systems in the near future. ...@@ -26,7 +26,7 @@ and aims to support other operating systems in the near future.
Dependencies include: Dependencies include:
* [CMake][] 3.10 or newer * [CMake][] 3.10 or newer
* [OpenHMD](https://openhmd.net) (found using pkg-config) * [OpenHMD][] (found using pkg-config)
* Vulkan headers * Vulkan headers
* Eigen3 * Eigen3
* glslang * glslang
...@@ -56,7 +56,7 @@ software to use direct mode, ...@@ -56,7 +56,7 @@ software to use direct mode,
without using any external, third-party, or backported without using any external, third-party, or backported
package sources. package sources.
See also [Status of DRM leases](https://haagch.frickel.club/#!drmlease.md) See also [Status of DRM Leases][drm-lease]
for more details on specific packages, versions, and commits. for more details on specific packages, versions, and commits.
Build process is similar to other CMake builds, Build process is similar to other CMake builds,
...@@ -65,13 +65,17 @@ so something like the following will build it. ...@@ -65,13 +65,17 @@ so something like the following will build it.
Go into the source directory, create a build directory, Go into the source directory, create a build directory,
and change into it. and change into it.
mkdir build ```bash
cd build mkdir build
cd build
```
Then, invoke [CMake to generate a project][cmake-generate]. Then, invoke [CMake to generate a project][cmake-generate].
Feel free to change the build type or generator ("Ninja" is fast and parallel) as you see fit. Feel free to change the build type or generator ("Ninja" is fast and parallel) as you see fit.
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" ```bash
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
```
If you plan to install the runtime, If you plan to install the runtime,
append something like `-DCMAKE_INSTALL_PREFIX=~/.local` append something like `-DCMAKE_INSTALL_PREFIX=~/.local`
...@@ -83,20 +87,24 @@ though you can manually invoke your build tool (`make`, `ninja`, etc.) if you pr ...@@ -83,20 +87,24 @@ though you can manually invoke your build tool (`make`, `ninja`, etc.) if you pr
The first command builds the runtime and docs, The first command builds the runtime and docs,
and the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`. and the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`.
cmake --build . ```bash
cmake --build . --target install cmake --build .
cmake --build . --target install
```
Alternately, if using Make, the following will build the runtime and docs, then install. Alternately, if using Make, the following will build the runtime and docs, then install.
Replace `make` with `ninja` if you used the Ninja generator. Replace `make` with `ninja` if you used the Ninja generator.
make ```bash
make install make
make install
```
Documentation can be browsed by opening `doc/html/index.html` in the build directory in a web browser. Documentation can be browsed by opening `doc/html/index.html` in the build directory in a web browser.
## Getting started using OpenXR with Monado ## Getting started using OpenXR with Monado
This implements the [OpenXR](https://khronos.org/openxr) API, This implements the [OpenXR][] API,
so to do anything with it, you'll need an application so to do anything with it, you'll need an application
that uses OpenXR, along with the OpenXR loader. that uses OpenXR, along with the OpenXR loader.
The OpenXR loader is a glue library that connects OpenXR applications to OpenXR runtimes such as Monado The OpenXR loader is a glue library that connects OpenXR applications to OpenXR runtimes such as Monado
...@@ -109,7 +117,9 @@ OpenXR loader and API layers. ...@@ -109,7 +117,9 @@ OpenXR loader and API layers.
The OpenXR loader can be pointed to a runtime json file in a nonstandard location with the environment variable `XR_RUNTIME_JSON`. Example: The OpenXR loader can be pointed to a runtime json file in a nonstandard location with the environment variable `XR_RUNTIME_JSON`. Example:
XR_RUNTIME_JSON=~/monado/build/openxr_monado-dev.json ./openxr-example ```bash
XR_RUNTIME_JSON=~/monado/build/openxr_monado-dev.json ./openxr-example
```
For this reason this runtime creates two manifest files within the build directory: For this reason this runtime creates two manifest files within the build directory:
...@@ -163,13 +173,18 @@ To manually apply clang-format to every non-external source file in the tree, ...@@ -163,13 +173,18 @@ To manually apply clang-format to every non-external source file in the tree,
run this command in the source dir with a `sh`-compatible shell run this command in the source dir with a `sh`-compatible shell
(Git for Windows git-bash should be OK): (Git for Windows git-bash should be OK):
scripts/format-project.sh ```bash
scripts/format-project.sh
```
You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command
if your clang-format binary isn't named `clang-format`. if your clang-format binary isn't named `clang-format`.
Note that you'll typically prefer to use something like `git clang-format` Note that you'll typically prefer to use something like `git clang-format`
to just re-format your changes, in case version differences in tools result in overall format changes. to just re-format your changes, in case version differences in tools result in overall format changes.
[OpenHMD]: https://openhmd.net
[drm-lease]: https://haagch.frickel.club/#!drmlease%2Emd
[OpenXR]: https://khronos.org/openxr
[clang-format]: https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormat.html [clang-format]: https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormat.html
[cmake-build]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode [cmake-build]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode
[cmake-generate]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html [cmake-generate]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html
......
...@@ -311,9 +311,10 @@ oxr_session_frame_wait(struct oxr_logger *log, ...@@ -311,9 +311,10 @@ oxr_session_frame_wait(struct oxr_logger *log,
//! @todo this should be carefully synchronized, because there may be //! @todo this should be carefully synchronized, because there may be
//! more than one session per instance. //! more than one session per instance.
timepoint_ns now = XRT_MAYBE_UNUSED timepoint_ns now =
time_state_get_now_and_update(sess->sys->inst->timekeeping); time_state_get_now_and_update(sess->sys->inst->timekeeping);
struct xrt_compositor *xc = sess->compositor; struct xrt_compositor *xc = sess->compositor;
xc->wait_frame(xc, &frameState->predictedDisplayTime, xc->wait_frame(xc, &frameState->predictedDisplayTime,
&frameState->predictedDisplayPeriod); &frameState->predictedDisplayPeriod);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment