Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

OpenXRAndroidThreadSettingsExtension

Eredita: OpenXRExtensionWrapper < Object

Incapsula l'estensione XR_KHR_android_thread_settings.

Descrizione

Affinché l'XR sia confortevole, è importante che le applicazioni forniscano i frame in modo rapido e costante. Per garantire che i thread più importanti dell'applicazione ricevano la giusta quantità di tempo, è necessario identificarli al sistema, che ne regolerà adeguatamente la priorità di pianificazione.

Metodi

bool

set_application_thread_type(thread_type: ThreadType, thread_id: int = 0)


Enumerazioni

enum ThreadType: 🔗

ThreadType THREAD_TYPE_APPLICATION_MAIN = 0

Suggerisce al runtime XR che il thread sta eseguendo attività critiche per il tempo sulla CPU.

ThreadType THREAD_TYPE_APPLICATION_WORKER = 1

Suggerisce al runtime XR che il thread sta eseguendo attività in background sulla CPU.

ThreadType THREAD_TYPE_RENDERER_MAIN = 2

Suggerimenti al runtime XR che il thread sta eseguendo attività critiche per il tempo sulla scheda grafica.

ThreadType THREAD_TYPE_RENDERER_WORKER = 3

Suggerisce al runtime XR che il thread sta eseguendo attività in background sulla scheda grafica.


Descrizioni dei metodi

bool set_application_thread_type(thread_type: ThreadType, thread_id: int = 0) 🔗

Imposta il tipo di thread del thread specificato, in modo che il runtime XR possa regolare adeguatamente la sua priorità di pianificazione.

thread_id si riferisce all'ID del thread nel sistema operativo (ovvero, quello ottenuto da gettid()). Quando thread_id è 0, imposta il tipo di thread del thread attuale.

NOTA: L'ID restituito da Thread.get_id() non è compatibile con thread_id.