From 4d68ea3997f9b1d8a80065b8c8ff7e0146f208f7 Mon Sep 17 00:00:00 2001 From: nickarora Date: Thu, 27 Feb 2020 01:25:09 -0800 Subject: [PATCH 1/2] minor modifications for building --- .../xcshareddata/xcschemes/SGPlayer iOS.xcscheme | 6 +----- scripts/do-compile-openssl.sh | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/SGPlayer.xcodeproj/xcshareddata/xcschemes/SGPlayer iOS.xcscheme b/SGPlayer.xcodeproj/xcshareddata/xcschemes/SGPlayer iOS.xcscheme index 11b46a99..612330e7 100644 --- a/SGPlayer.xcodeproj/xcshareddata/xcschemes/SGPlayer iOS.xcscheme +++ b/SGPlayer.xcodeproj/xcshareddata/xcschemes/SGPlayer iOS.xcscheme @@ -29,11 +29,9 @@ shouldUseLaunchSchemeArgsEnv = "YES"> - - - - Date: Fri, 28 Feb 2020 16:33:13 -0800 Subject: [PATCH 2/2] force 90 degree fov in VR --- SGPlayer/Classes/Core/SGVR/SGVRProjection.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SGPlayer/Classes/Core/SGVR/SGVRProjection.m b/SGPlayer/Classes/Core/SGVR/SGVRProjection.m index 05d1cbfb..bda4d8f7 100644 --- a/SGPlayer/Classes/Core/SGVR/SGVRProjection.m +++ b/SGPlayer/Classes/Core/SGVR/SGVRProjection.m @@ -94,11 +94,18 @@ - (BOOL)matrixWithAspect:(Float64)aspect matrix1:(GLKMatrix4 *)matrix1 modelMatrix = GLKMatrix4Multiply(modelMatrix, self.sensor.matrix); } #endif + // model modelMatrix = GLKMatrix4RotateY(modelMatrix, GLKMathDegreesToRadians(self.viewport.x) * (self.viewport.flipX ? -1 : 1)); - GLKMatrix4 viewMatrix = GLKMatrix4MakeLookAt(0, 0, 0.0, 0, 0, -1000, 0, 1, 0); - GLKMatrix4 projectionMatrix = GLKMatrix4MakePerspective(GLKMathDegreesToRadians(self.viewport.degress), aspect, 0.1f, 400.0f); + + // view + GLKMatrix4 viewMatrix = GLKMatrix4MakeLookAt(0, 0, 0, 0, 0, -1000, 0, 1, 0); + + // projection + GLKMatrix4 projectionMatrix = GLKMatrix4MakePerspective(GLKMathDegreesToRadians(90), aspect, 0.1f, 400.0f); + GLKMatrix4 modelViewProjectionMatrix = GLKMatrix4Multiply(projectionMatrix, viewMatrix); modelViewProjectionMatrix = GLKMatrix4Multiply(modelViewProjectionMatrix, modelMatrix); + *matrix1 = modelViewProjectionMatrix; self.lastMatrix1Available = YES; self.lastMatrix11 = modelViewProjectionMatrix;