evan
2026.1.4
Evan
Loading...
Searching...
No Matches
AndroidXrPlatform.hpp
1
/*
2
** ETIB PROJECT, 2026
3
** evan
4
** File description:
5
** AndroidXrPlatform
6
*/
7
8
#pragma once
9
10
#include "evan/openxr/IXrPlatform.hpp"
11
12
#include <filesystem>
13
14
namespace
evan
15
{
26
class
AndroidXrPlatform
:
public
IXrPlatform
27
{
28
public
:
40
struct
AndroidPlatformData
{
47
void
*
applicationVM
;
48
55
void
*
applicationActivity
;
56
63
void
*
androidApp
;
64
};
65
73
struct
AndroidAppState
{
74
#ifdef __ANDROID__
81
ANativeWindow
*
NativeWindow
=
nullptr
;
82
#endif
83
90
bool
_resumed
=
false
;
91
99
bool
_paused
=
false
;
100
};
101
113
AndroidXrPlatform
(
const
AndroidPlatformData
&
platformData
);
114
120
~AndroidXrPlatform
()
override
=
default
;
121
145
std::vector<std::string>
getRequiredInstanceExtensions
()
const override
;
146
164
const
XrBaseInStructure
*
getInstanceCreateInfo
()
const override
;
165
175
AndroidAppState
_appState
= {};
176
177
protected
:
190
std::filesystem::path
getDefaultCacheRoot
()
const override
;
191
192
private
:
193
#ifdef __ANDROID__
203
XrInstanceCreateInfoAndroidKHR
_instanceCreateInfoAndroid
{};
204
#endif
205
216
AndroidPlatformData _platformData;
217
};
218
}
// namespace evan
evan::AndroidXrPlatform
The AndroidXrPlatform class provides platform-specific implementations for OpenXR on Android devices.
Definition
AndroidXrPlatform.hpp:27
evan::AndroidXrPlatform::getInstanceCreateInfo
const XrBaseInStructure * getInstanceCreateInfo() const override
Retrieves the Android-specific XR instance creation information.
Definition
AndroidXrPlatform.cpp:178
evan::AndroidXrPlatform::getDefaultCacheRoot
std::filesystem::path getDefaultCacheRoot() const override
Get the cache root directory of the Android application.
Definition
AndroidXrPlatform.cpp:192
evan::AndroidXrPlatform::~AndroidXrPlatform
~AndroidXrPlatform() override=default
Destructor for AndroidXrPlatform.
evan::AndroidXrPlatform::getRequiredInstanceExtensions
std::vector< std::string > getRequiredInstanceExtensions() const override
Retrieves the list of required OpenXR instance extensions for Android platform.
Definition
AndroidXrPlatform.cpp:167
evan::AndroidXrPlatform::_appState
AndroidAppState _appState
Tracks the current state of the Android application.
Definition
AndroidXrPlatform.hpp:175
evan::IXrPlatform
OpenXR platform implementation.
Definition
IXrPlatform.hpp:27
evan::AndroidXrPlatform::AndroidAppState
Struct to track the current state of the Android application. This struct is used to manage the lifec...
Definition
AndroidXrPlatform.hpp:73
evan::AndroidXrPlatform::AndroidAppState::_paused
bool _paused
Indicates whether the Android application is currently paused. This flag can be used to determine if ...
Definition
AndroidXrPlatform.hpp:99
evan::AndroidXrPlatform::AndroidAppState::_resumed
bool _resumed
Indicates whether the Android application is currently resumed. This flag can be used to determine if...
Definition
AndroidXrPlatform.hpp:90
evan::AndroidXrPlatform::AndroidPlatformData
Struct to hold Android-specific platform data for OpenXR initialization.
Definition
AndroidXrPlatform.hpp:40
evan::AndroidXrPlatform::AndroidPlatformData::androidApp
void * androidApp
Pointer to the Android application structure. This is used for handling Android application lifecycle...
Definition
AndroidXrPlatform.hpp:63
evan::AndroidXrPlatform::AndroidPlatformData::applicationVM
void * applicationVM
Pointer to the Android application VM.
Definition
AndroidXrPlatform.hpp:47
evan::AndroidXrPlatform::AndroidPlatformData::applicationActivity
void * applicationActivity
Pointer to the Android application activity.
Definition
AndroidXrPlatform.hpp:55
evan::Result
Small result wrapper used by helpers that must return both a status and a value (e....
Definition
Error.hpp:89
headers
evan
openxr
platform
AndroidXrPlatform.hpp
Generated by
1.9.8