Skip to content

Commit

Permalink
Merge pull request #208 from aaronfranke/formatting
Browse files Browse the repository at this point in the history
Some formatting cleanup, remove trailing space characters and POSIX compliance
  • Loading branch information
rpavlik authored Sep 18, 2020
2 parents 63e7a59 + db1007e commit 3cdc1b0
Show file tree
Hide file tree
Showing 51 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/build_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ jobs:
condition: succeeded()
inputs:
path: $(System.DefaultWorkingDirectory)/nuget
artifact: NuGet
artifact: NuGet
4 changes: 2 additions & 2 deletions .azure-pipelines/nuget/NugetTemplate/OpenXR.Loader.nuspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>OpenXR.Loader</id>
Expand All @@ -12,4 +12,4 @@
<description>Khronos OpenXR loader and headers required to build a Win32 or UWP OpenXR application</description>
<tags>native khronos openxr loader</tags>
</metadata>
</package>
</package>
2 changes: 1 addition & 1 deletion .azure-pipelines/nuget/stage_nuget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ CopyLoader "Win32"
CopyLoader "x64_uwp"
CopyLoader "Win32_uwp"
CopyLoader "arm64_uwp"
CopyLoader "arm_uwp"
CopyLoader "arm_uwp"
8 changes: 4 additions & 4 deletions .azure-pipelines/openxr-sdk-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ stages:
- script: ls -la sdk-tarball || true
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Pipeline.Workspace)/*.tar.gz'
archiveFilePatterns: '$(Pipeline.Workspace)/*.tar.gz'
destinationFolder: $(Pipeline.Workspace)/pregen
cleanDestinationFolder: true
cleanDestinationFolder: true
- script: ls -la $(Pipeline.Workspace)/pregen
- template: build_linux.yml
parameters:
Expand All @@ -89,9 +89,9 @@ stages:

- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Pipeline.Workspace)/*.tar.gz'
archiveFilePatterns: '$(Pipeline.Workspace)/*.tar.gz'
destinationFolder: $(Pipeline.Workspace)/pregen
cleanDestinationFolder: true
cleanDestinationFolder: true

- template: build_msvc.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/organize_windows_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def move(src, dest):
if not include_copied:
# Move over one set of includes to the base
move(artifact / 'include', outbase / 'include')
include_copied = True
include_copied = True

# lib files
move(artifact / 'lib', base / 'lib')
Expand Down
2 changes: 1 addition & 1 deletion .proclamation.json.license
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020 Collabora, Ltd. and the Proclamation contributors
Copyright (c) 2020 The Khronos Group Inc.

SPDX-License-Identifier: CC0-1.0
SPDX-License-Identifier: CC0-1.0
12 changes: 6 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ SPDX-License-Identifier: CC-BY-4.0

## Python v3.6+ required

Certain source files are generated at build time from the `xr.xml` file, utilizing
python scripts. The scripts make use of the python `pathlib` module, which is
Certain source files are generated at build time from the `xr.xml` file, utilizing
python scripts. The scripts make use of the python `pathlib` module, which is
fully supported in python version 3.6 or later.

You will also need the python `jinja2` package, available from your package
Expand Down Expand Up @@ -88,7 +88,7 @@ cmake -DCMAKE_BUILD_TYPE=Release ../..
make
```

## (Optional) Building the OpenXR Loader as a DLL
## (Optional) Building the OpenXR Loader as a DLL

The OpenXR loader is built as a static library by default. To instead build as a dynamic link library, define
the cmake option `DYNAMIC_LOADER=ON`. e.g. for Win64, replace the cmake line shown above with:
Expand All @@ -103,15 +103,15 @@ cmake -DDYNAMIC_LOADER=ON -G "Visual Studio [Version Number] Win64" ../..

An OpenXR _runtime_ must first be installed before running the hello_xr sample. The runtime is an
implementation of the OpenXR API, typically tailed to a specific device and distributed by the
device manufacturer. To allow experimentation with the API in the absence of a specific device runtime,
several organizations have made available prototype OpenXR runtimes, linked from the main OpenXR landing
device manufacturer. To allow experimentation with the API in the absence of a specific device runtime,
several organizations have made available prototype OpenXR runtimes, linked from the main OpenXR landing
page at https://www.khronos.org/openxr

## Configuring the OpenXR Loader
### XR\_RUNTIME\_JSON environment variable

The OpenXR loader looks in system-specific locations for the JSON file `active_runtime.json`, which describes the
default installed OpenXR runtime. To override the default selection, you may define an environment variable
default installed OpenXR runtime. To override the default selection, you may define an environment variable
`XR_RUNTIME_JSON` to select a different runtime, or a runtime which has not been installed in the default
location.

Expand Down
20 changes: 10 additions & 10 deletions LICENSES/Apache-2.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ AND DISTRIBUTION

1. Definitions.



"License" shall mean the terms and conditions for use, reproduction, and distribution
as defined by Sections 1 through 9 of this document.



"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.



"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
Expand All @@ -26,31 +26,31 @@ or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more
of the outstanding shares, or (iii) beneficial ownership of such entity.



"You" (or "Your") shall mean an individual or Legal Entity exercising permissions
granted by this License.



"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.



"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.



"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the Appendix
below).



"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial revisions,
Expand All @@ -59,7 +59,7 @@ original work of authorship. For the purposes of this License, Derivative
Works shall not include works that remain separable from, or merely link (or
bind by name) to the interfaces of, the Work and Derivative Works thereof.



"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative
Expand All @@ -74,7 +74,7 @@ for the purpose of discussing and improving the Work, but excluding communicatio
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."



"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently incorporated
Expand Down
2 changes: 1 addition & 1 deletion include/openxr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(HAVE_PREGENERATED AND NOT BUILD_FORCE_GENERATION)
add_custom_target(generate_openxr_header
COMMENT "Using found pre-generated OpenXR headers.")

set(INSTALL_HEADERS
set(INSTALL_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/openxr_platform_defines.h
${SOURCE_HEADERS})
else()
Expand Down
2 changes: 1 addition & 1 deletion include/openxr/openxr_platform_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef unsigned __int64 uint64_t;
#endif
#endif

// Identifies if the current compiler has C++11 support enabled.
// Identifies if the current compiler has C++11 support enabled.
// Does not by itself identify if any given C++11 feature is present.
#if !defined(XR_CPP11_ENABLED) && defined(__cplusplus)
#if defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
Expand Down
6 changes: 3 additions & 3 deletions specification/loader/api_layer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ only requirement is that the filename extension is ".json".
with each "version" of the API layer) must be set in the environment or else
the implicit API layer is not loaded. This is for application environments
(e.g. Steam) which want to enable an API layer(s) only for applications that
they launch, and allows for applications run outside of that
they launch, and allows for applications run outside of that
environment to not get that implicit API layer(s).
| N/A
| "disable_environment"
Expand Down Expand Up @@ -623,7 +623,7 @@ struct XrNegotiateLoaderInfo {

You'll notice the structures are similar to other OpenXR structures.
The "structType" field, in this case takes a new enum defined just for internal
loader interfacing use.
loader interfacing use.

The ename:XrLoaderInterfaceStructs enumeration is also defined in the
`src/common/loader_interfaces.h` header and currently looks like:
Expand Down Expand Up @@ -699,7 +699,7 @@ variable of type slink:XrNegotiateLoaderInfo and initialize it in the following
`XR_LOADER_INFO_STRUCT_VERSION`
3. Set the structure "structSize" to the current size of the
`XrNegotiateLoaderInfo` structure
4. Set "minInterfaceVersion" to the minimum
4. Set "minInterfaceVersion" to the minimum
<<api-layer-interface-versions,loader/API layer interface version>> that the
loader supports
5. Set "maxInterfaceVersion" to the current version of the
Expand Down
28 changes: 14 additions & 14 deletions specification/loader/application.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[[application-interaction]]
== Application Interaction ==

An application requests a specific version of the OpenXR API when creating an
instance by writing to the "apiVersion" member of the `XrApplicationInfo`
An application requests a specific version of the OpenXR API when creating an
instance by writing to the "apiVersion" member of the `XrApplicationInfo`
structure which, in turn, is passed into the `XrInstanceCreateInfo` structure.
If either the loader or the active runtime do not support the requested version,
they may return an error and fail instance creation. Refer to the
Expand All @@ -20,8 +20,8 @@ through the loader:

1. Directly linking to the core OpenXR commands exposed and exported by the loader.
2. Creating an application-managed dispatch table of OpenXR commands by querying
the loader for function pointers via `xrGetInstanceProcAddr`. This method
supports core OpenXR commands, commands of (enabled) OpenXR extensions supported by the runtime,
the loader for function pointers via `xrGetInstanceProcAddr`. This method
supports core OpenXR commands, commands of (enabled) OpenXR extensions supported by the runtime,
and any commands exposed by enabled API layers.

[[openxr-direct-exports]]
Expand Down Expand Up @@ -110,7 +110,7 @@ second call chain.
[[openxr-indirect-linking]]
==== OpenXR Indirect Linking ====

With loader indirect linking an application dynamically generates its own
With loader indirect linking an application dynamically generates its own
dispatch table of OpenXR commands. This method allows an application to
fail gracefully if the loader cannot be found, or supports an older version
of the API than the application. To do this, the application uses the
Expand Down Expand Up @@ -154,13 +154,13 @@ versions of OpenXR.
=== Application API Layer Usage ===

Applications desiring OpenXR functionality beyond what the core API offers may
use various API layers or extensions. An API layer cannot introduce new OpenXR
use various API layers or extensions. An API layer cannot introduce new OpenXR
_core_ API commands, but may introduce new extension-specific OpenXR commands
that can be queried through the extension interface.

A common use of API layers is for validation which can be enabled by loading the
API layer during application development, but not loading the API layer for
application release. The overhead cost of validation is completely eliminated
application release. The overhead cost of validation is completely eliminated
when the layer is not loaded.

An application can discover which API layers are available to it with
Expand All @@ -169,7 +169,7 @@ that have been discovered by the loader. The loader looks in various locations
to find API layers on the system. For more information see the
<<api-layer-discovery,API Layer discovery>> section below.

An API layer or layers may be enabled by an application by passing a list of
An API layer or layers may be enabled by an application by passing a list of
names in the `enabledApiLayerNames` field of the `XrInstanceCreateInfo`
at `xrCreateInstance` time. During the `xrCreateInstance`, the loader
constructs a <<openxr-call-chains, call chain>> that includes the application
Expand All @@ -193,12 +193,12 @@ ensure that you are using it properly.
[[implicit-vs-explicit-api-layers]]
==== Implicit vs Explicit API Layers ====

Explicit API layers are API layers which are enabled by an application (e.g.
Explicit API layers are API layers which are enabled by an application (e.g.
with the `xrCreateInstance` function) or by setting a
<<forced-loading-of-api-layers, loader environment variable>>.
<<forced-loading-of-api-layers, loader environment variable>>.

Implicit API layers are API layers which are enabled simply because they exist.
An implicit layer found by the loader will be loaded by default, unless
Implicit API layers are API layers which are enabled simply because they exist.
An implicit layer found by the loader will be loaded by default, unless
specifically disabled.

Some implicit API layer examples include:
Expand All @@ -209,7 +209,7 @@ Some implicit API layer examples include:
* A tracing API layer designed to record API commands for future playback.

Because implicit API layers are enabled automatically, they have an additional
requirement over explicit API layers in that they must specify a
requirement over explicit API layers in that they must specify a
"disable environment variable" in the API layer's
<<api-layer-manifest-file-format, JSON manifest file>>, with key name `disable_environment`.
This environment variable when present will disable the implicit API layer. Implicit
Expand Down Expand Up @@ -337,7 +337,7 @@ additional loader functionality. Information about various extensions can be
found in the <<openxr-spec,OpenXR API Specification>>, and `openxr.h` header
file.

To use extension functionality, the application should: call
To use extension functionality, the application should: call
`xrEnumerateInstanceExtensionProperties` to determine if the extension is available.
Then it must: enable the extension in `xrCreateInstance`.

Expand Down
8 changes: 4 additions & 4 deletions specification/loader/design.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The OpenXR loader is responsible with interfacing with other libraries to
complete its tasks. Typically, there will be some interface negotiation
between these other libraries and the loader (see
<<loader-api-layer-interface-negotiation, Loader/Layer Interface Negotiation>>
or
or
<<loader-runtime-interface-negotiation, Loader/Runtime Interface Negotiation>>
for more information). The Interface classes are responsible with using
the contents of a ManifestFile to setup the interface. Each Interface
Expand Down Expand Up @@ -677,7 +677,7 @@ const char *LoaderPlatformLibraryOpenError(
flink:LoaderPlatformLibraryOpen.

The returned C-style character string contains any available platform-specific
error code that may have occurred.
error code that may have occurred.


.Closing A Platform-Specific Library File
Expand Down Expand Up @@ -719,7 +719,7 @@ If the function succeeds, the returned value will be a valid function
pointer address. If the function fails, it will return NULL. A NULL return
value could imply that the function simply isn't exported by the library,
or that an error occurred during the platform call. To determine what
might have happened, the loader will call the
might have happened, the loader will call the
fname:LoaderPlatformLibraryGetProcAddrError function:

[[LoaderPlatformLibraryGetProcAddrError]]
Expand All @@ -733,7 +733,7 @@ const char *LoaderPlatformLibraryGetProcAddrError(
flink:LoaderPlatformLibraryGetProcAddr call.

The returned C-style character string contains any available platform-specific
error code that may have occurred.
error code that may have occurred.


[[environment-variable-usage]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
2 changes: 1 addition & 1 deletion specification/loader/images/call_chain_example.svg.license
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
2 changes: 1 addition & 1 deletion specification/loader/images/class_diagram.svg.license
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
2 changes: 1 addition & 1 deletion specification/loader/images/high_level_loader.svg.license
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright (c) 2017-2020 The Khronos Group Inc

SPDX-License-Identifier: CC-BY-4.0
SPDX-License-Identifier: CC-BY-4.0
Loading

0 comments on commit 3cdc1b0

Please sign in to comment.