Home

xrCreateInstanceconst

xrCreateInstanceconst is not a distinct OpenXR function. In practice, there is a single official entry point named xrCreateInstance, and the const qualifier appears in its parameter type rather than in a separate function name. Some documentation or informal references may appear as xrCreateInstanceconst when describing the const-qualified XrInstanceCreateInfo* argument passed to xrCreateInstance. The correct API signature is: XrResult xrCreateInstance(const XrInstanceCreateInfo* createInfo, XrInstance* instance).

Purpose and behavior

xrCreateInstance creates a new OpenXR instance, which serves as the top-level handle for interacting with a

Parameters and data structures

The first argument is a pointer to a const XrInstanceCreateInfo, which describes the creation request and must

- type and next fields to identify the structure and its extensions

- applicationInfo, which carries applicationName, applicationVersion, engineName, engineVersion, and apiVersion

- enabledExtensionNames and enabledExtensionCount to request runtime-supported extensions

- enabledApiLayerNames and enabledApiLayerCount to enable validation layers or other API layers

Usage notes

The runtime version and API compatibility influence success; if the requested apiVersion is not supported, creation

See also

xrDestroyInstance, XrInstanceCreateInfo, XrApplicationInfo, OpenXR specification.

runtime.
The
call
initializes
runtime
state,
enables
requested
layers
and
extensions,
and
establishes
the
application
and
engine
metadata
that
the
runtime
uses
for
configuration
and
diagnostics.
A
successful
call
writes
a
valid
XrInstance
handle
to
the
output
parameter
and
returns
XR_SUCCESS.
On
failure,
an
appropriate
XrResult
error
code
is
returned.
be
properly
populated.
The
XrInstanceCreateInfo
structure
includes:
may
fail.
The
created
instance
is
shared
across
threads
for
subsequent
OpenXR
calls
and
should
be
destroyed
with
xrDestroyInstance
when
no
longer
needed.