aboutsummaryrefslogtreecommitdiff
path: root/examples/oculus_glfw_sample
diff options
context:
space:
mode:
authorJoshua Reisenauer <kd7tck@msn.com>2016-06-03 14:01:04 -0700
committerJoshua Reisenauer <kd7tck@msn.com>2016-06-03 14:01:04 -0700
commite3b248545353720090f28a6c4e8a8c8a34bb1269 (patch)
tree59e40c6862a88affa8bcdba4979c6a8956581ac1 /examples/oculus_glfw_sample
parent96fa716525e22f9f75575f2dc1b431c58567d8a1 (diff)
parent60232810d83c7ea3a52491f0b20444003be53358 (diff)
downloadraylib-e3b248545353720090f28a6c4e8a8c8a34bb1269.tar.gz
raylib-e3b248545353720090f28a6c4e8a8c8a34bb1269.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'examples/oculus_glfw_sample')
-rw-r--r--examples/oculus_glfw_sample/oculus_glfw_sample.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/oculus_glfw_sample/oculus_glfw_sample.c b/examples/oculus_glfw_sample/oculus_glfw_sample.c
index 9f438185..54302de8 100644
--- a/examples/oculus_glfw_sample/oculus_glfw_sample.c
+++ b/examples/oculus_glfw_sample/oculus_glfw_sample.c
@@ -237,15 +237,19 @@ int main(void)
{
rlViewport(layer.eyeLayer.Viewport[eye].Pos.x, layer.eyeLayer.Viewport[eye].Pos.y, layer.eyeLayer.Viewport[eye].Size.w, layer.eyeLayer.Viewport[eye].Size.h);
- Quaternion eyeRPose = (Quaternion){ eyePoses[eye].Orientation.x, eyePoses[eye].Orientation.y, eyePoses[eye].Orientation.z, eyePoses[eye].Orientation.w };
+ Quaternion eyeRPose = (Quaternion){ layer.eyeLayer.RenderPose[eye].Orientation.x,
+ layer.eyeLayer.RenderPose[eye].Orientation.y,
+ layer.eyeLayer.RenderPose[eye].Orientation.z,
+ layer.eyeLayer.RenderPose[eye].Orientation.w };
QuaternionInvert(&eyeRPose);
Matrix eyeOrientation = QuaternionToMatrix(eyeRPose);
- Matrix eyeTranslation = MatrixTranslate(-eyePoses[eye].Position.x, -eyePoses[eye].Position.y, -eyePoses[eye].Position.z);
-
+ Matrix eyeTranslation = MatrixTranslate(-layer.eyeLayer.RenderPose[eye].Position.x,
+ -layer.eyeLayer.RenderPose[eye].Position.y,
+ -layer.eyeLayer.RenderPose[eye].Position.z);
+
Matrix eyeView = MatrixMultiply(eyeTranslation, eyeOrientation);
Matrix modelview = MatrixMultiply(matView, eyeView);
- //Matrix mvp = MatrixMultiply(modelview, layer.eyeProjections[eye]);
-
+
SetMatrixModelview(modelview);
SetMatrixProjection(layer.eyeProjections[eye]);
#else