Skip to content

Commit e088ec6

Browse files
committed
Remove Surface's Eye, because it doesn't need it. Added comments to VRSurface.
1 parent 5197e92 commit e088ec6

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ private void CreateEyeSurface(uint eyeIndex)
173173
}
174174
GameObject surfaceGameObject = new GameObject("Surface");
175175
VRSurface surface = surfaceGameObject.AddComponent<VRSurface>();
176-
surface.Eye = eyes[eyeIndex];
177176
surface.Camera = surfaceGameObject.AddComponent<Camera>();
178177
surface.Camera.nearClipPlane = nearClippingPlane;
179178
surface.Camera.farClipPlane = farClippingPlane;

OSVR-Unity/Assets/OSVRUnity/src/VRSurface.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,29 @@ public K1RadialDistortion DistortionEffect
5353
}
5454
}
5555

56-
56+
//Set the camera's viewport rect
5757
public void SetViewport(Rect rect)
5858
{
5959
_camera.rect = rect;
6060
}
6161

62+
//Set the camera's view matrix
6263
public void SetViewMatrix(Matrix4x4 viewMatrix)
6364
{
6465
_camera.worldToCameraMatrix = viewMatrix;
6566
}
6667

68+
//Set the camera's projection matrix
6769
public void SetProjectionMatrix(Matrix4x4 projMatrix)
6870
{
6971
_camera.projectionMatrix = projMatrix;
7072
}
7173

74+
//Render the camera
7275
public void Render()
7376
{
7477
_camera.Render();
7578
}
76-
7779
}
7880
}
7981
}

0 commit comments

Comments
 (0)