mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
OpenXR - Viewport init better
This commit is contained in:
parent
00aaf9e1a6
commit
22db37d128
2 changed files with 8 additions and 3 deletions
|
@ -111,7 +111,7 @@ void EnterVR(bool firstStart) {
|
|||
VR_EnterVR(VR_GetEngine());
|
||||
IN_VRInit(VR_GetEngine());
|
||||
}
|
||||
VR_InitRenderer(VR_GetEngine(), IsMultiviewSupported());
|
||||
VR_SetConfig(VR_CONFIG_VIEWPORT_VALID, false);
|
||||
}
|
||||
|
||||
void GetVRResolutionPerEye(int* width, int* height) {
|
||||
|
@ -220,6 +220,11 @@ void BindVRFramebuffer() {
|
|||
}
|
||||
|
||||
bool PreVRRender() {
|
||||
if (!VR_GetConfig(VR_CONFIG_VIEWPORT_VALID)) {
|
||||
VR_InitRenderer(VR_GetEngine(), IsMultiviewSupported());
|
||||
VR_SetConfig(VR_CONFIG_VIEWPORT_VALID, true);
|
||||
}
|
||||
|
||||
if (VR_BeginFrame(VR_GetEngine())) {
|
||||
|
||||
// Decide if the scene is 3D or not
|
||||
|
|
|
@ -16,8 +16,8 @@ enum VRConfig {
|
|||
VR_CONFIG_MENU_PITCH, VR_CONFIG_MENU_YAW, VR_CONFIG_RECENTER_YAW,
|
||||
//mouse cursor
|
||||
VR_CONFIG_MOUSE_SIZE, VR_CONFIG_MOUSE_X, VR_CONFIG_MOUSE_Y,
|
||||
//viewport size
|
||||
VR_CONFIG_VIEWPORT_WIDTH, VR_CONFIG_VIEWPORT_HEIGHT,
|
||||
//viewport setup
|
||||
VR_CONFIG_VIEWPORT_WIDTH, VR_CONFIG_VIEWPORT_HEIGHT, VR_CONFIG_VIEWPORT_VALID,
|
||||
|
||||
//end
|
||||
VR_CONFIG_MAX
|
||||
|
|
Loading…
Add table
Reference in a new issue