mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 14:00:03 +00:00
OpenXR - Better variable/methods naming
This commit is contained in:
parent
0c2d47d74d
commit
3331fedab7
@ -200,7 +200,6 @@ bool GLRenderManager::ThreadFrame() {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (!run_)
|
||||
return false;
|
||||
bool vrlock = false;
|
||||
|
||||
// In case of syncs or other partial completion, we keep going until we complete a frame.
|
||||
do {
|
||||
@ -237,11 +236,11 @@ bool GLRenderManager::ThreadFrame() {
|
||||
firstFrame = false;
|
||||
}
|
||||
|
||||
// Creation of OpenXR frame. This updates user's head pose and VR timestamps.
|
||||
// For fluent rendering, the time between PreVRRender and PostVRRender must be really short.
|
||||
if (IsVRBuild() && !vrlock) {
|
||||
if (PreVRRender()) {
|
||||
vrlock = true;
|
||||
// Start of an OpenXR frame. This updates user's head pose and VR timestamps.
|
||||
// For fluent rendering, delay between StartVRRender and FinishVRRender must be very short.
|
||||
if (IsVRBuild() && !vrRenderStarted) {
|
||||
if (StartVRRender()) {
|
||||
vrRenderStarted = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -254,8 +253,9 @@ bool GLRenderManager::ThreadFrame() {
|
||||
} while (!nextFrame);
|
||||
|
||||
// Post OpenXR frame on a screen.
|
||||
if (IsVRBuild() && vrlock) {
|
||||
PostVRRender();
|
||||
if (IsVRBuild() && vrRenderStarted) {
|
||||
FinishVRRender();
|
||||
vrRenderStarted = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1041,6 +1041,7 @@ private:
|
||||
|
||||
bool nextFrame = false;
|
||||
bool firstFrame = true;
|
||||
bool vrRenderStarted = false;
|
||||
|
||||
GLDeleter deleter_;
|
||||
bool skipGLCalls_ = false;
|
||||
|
@ -220,7 +220,7 @@ void BindVRFramebuffer() {
|
||||
VR_BindFramebuffer(VR_GetEngine());
|
||||
}
|
||||
|
||||
bool PreVRRender() {
|
||||
bool StartVRRender() {
|
||||
if (!VR_GetConfig(VR_CONFIG_VIEWPORT_VALID)) {
|
||||
VR_InitRenderer(VR_GetEngine(), IsMultiviewSupported());
|
||||
VR_SetConfig(VR_CONFIG_VIEWPORT_VALID, true);
|
||||
@ -245,7 +245,7 @@ bool PreVRRender() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void PostVRRender() {
|
||||
void FinishVRRender() {
|
||||
VR_FinishFrame(VR_GetEngine());
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@ void UpdateVRScreenKey(const KeyInput &key);
|
||||
|
||||
// VR rendering integration
|
||||
void BindVRFramebuffer();
|
||||
bool PreVRRender();
|
||||
void PostVRRender();
|
||||
bool StartVRRender();
|
||||
void FinishVRRender();
|
||||
void PreVRFrameRender(int fboIndex);
|
||||
void PostVRFrameRender();
|
||||
int GetVRFBOIndex();
|
||||
@ -38,8 +38,8 @@ inline void UpdateVRScreenKey(const KeyInput &key) {}
|
||||
|
||||
// VR rendering integration
|
||||
inline void BindVRFramebuffer() {}
|
||||
inline bool PreVRRender() { return false; }
|
||||
inline void PostVRRender() {}
|
||||
inline bool StartVRRender() { return false; }
|
||||
inline void FinishVRRender() {}
|
||||
inline void PreVRFrameRender(int fboIndex) {}
|
||||
inline void PostVRFrameRender() {}
|
||||
inline int GetVRFBOIndex() { return 0; }
|
||||
|
Loading…
Reference in New Issue
Block a user