Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
XR_KHR_android_surface_swapchain - instance extension
Specification
See XR_KHR_android_surface_swapchain in the main specification for complete information.
Registered Extension Number
5
Revision
4
Extension and Version Dependencies
- Requires OpenXR 1.0
See Also
createSwapchainAndroidSurfaceKHR
Document Notes
For more information, see the OpenXR Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- createSwapchainAndroidSurfaceKHR :: forall a io. (Extendss SwapchainCreateInfo a, PokeChain a, MonadIO io) => Session -> SwapchainCreateInfo a -> ("surface" ::: Ptr Jobject) -> io (Result, Swapchain)
- withSwapchainAndroidSurfaceKHR :: forall a io r. (Extendss SwapchainCreateInfo a, PokeChain a, MonadIO io) => Session -> SwapchainCreateInfo a -> Ptr Jobject -> (io (Result, Swapchain) -> ((Result, Swapchain) -> io ()) -> r) -> r
- type KHR_android_surface_swapchain_SPEC_VERSION = 4
- pattern KHR_android_surface_swapchain_SPEC_VERSION :: forall a. Integral a => a
- type KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME = "XR_KHR_android_surface_swapchain"
- pattern KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data Jobject
Documentation
createSwapchainAndroidSurfaceKHR Source #
:: forall a io. (Extendss SwapchainCreateInfo a, PokeChain a, MonadIO io) | |
=> Session |
|
-> SwapchainCreateInfo a |
|
-> ("surface" ::: Ptr Jobject) |
|
-> io (Result, Swapchain) |
xrCreateSwapchainAndroidSurfaceKHR - Creates a swapchain and an Android Surface
Parameter Descriptions
Description
createSwapchainAndroidSurfaceKHR
creates an
Swapchain
object returned in swapchain
and an
Android Surface jobject
returned in surface
. The jobject
must be
valid to be passed back to Java code using JNI and must be valid to be
used with ordinary Android APIs for submitting images to Surfaces. The
returned Swapchain
must be valid to be
referenced in SwapchainSubImage
structures to
show content on the screen. The width and height passed in
SwapchainCreateInfo
may not be persistent
throughout the life cycle of the created swapchain, since on Android,
the size of the images is controlled by the producer and possibly
changes at any time.
The only function that is allowed to be called on the
Swapchain
returned from this function is
destroySwapchain
. For example, calling any of the
functions enumerateSwapchainImages
,
acquireSwapchainImage
,
waitSwapchainImage
or
releaseSwapchainImage
is invalid.
When the application receives the
EventDataSessionStateChanged
event with the
SESSION_STATE_STOPPING
state, it
must ensure that no threads are writing to any of the Android surfaces
created with this extension before calling
endSession
. The effect of writing frames to the
Surface when the session is in states other than
SESSION_STATE_VISIBLE
or
SESSION_STATE_FOCUSED
is undefined.
createSwapchainAndroidSurfaceKHR
must return the same set of error
codes as createSwapchain
under the same
circumstances, plus
ERROR_FUNCTION_UNSUPPORTED
in case the
function is not supported.
Valid Usage of SwapchainCreateInfo
members
- The
SwapchainCreateInfo
::format
,SwapchainCreateInfo
::sampleCount
,SwapchainCreateInfo
::faceCount
,SwapchainCreateInfo
::arraySize
andSwapchainCreateInfo
::mipCount
members of the structure passed as theinfo
parameter must be zero.
Valid Usage (Implicit)
- The
@@ extension must be enabled prior to calling
createSwapchainAndroidSurfaceKHR
-
session
must be a validSession
handle -
info
must be a pointer to a validSwapchainCreateInfo
structure -
swapchain
must be a pointer to anSwapchain
handle -
surface
must be a pointer to ajobject
value
Return Codes
See Also
withSwapchainAndroidSurfaceKHR :: forall a io r. (Extendss SwapchainCreateInfo a, PokeChain a, MonadIO io) => Session -> SwapchainCreateInfo a -> Ptr Jobject -> (io (Result, Swapchain) -> ((Result, Swapchain) -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createSwapchainAndroidSurfaceKHR
and destroySwapchain
To ensure that destroySwapchain
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,)
as the last argument.
pattern KHR_android_surface_swapchain_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME = "XR_KHR_android_surface_swapchain" Source #
pattern KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #