mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-21 07:33:45 +00:00
Remove projection offset, add the hmd head matrix. Also tidy up a few things.
This commit is contained in:
parent
e7bafe3c7b
commit
f91aa639d6
20 changed files with 126 additions and 113 deletions
|
|
@ -348,7 +348,6 @@ bool GameProcessCameraQuery(CameraQuery *query)
|
|||
query->farPlane = gClientSceneGraph->getVisibleDistance() * CameraAndFOV::sVisDistanceScale;
|
||||
|
||||
// Provide some default values
|
||||
query->projectionOffset = Point2F::Zero;
|
||||
query->stereoTargets[0] = 0;
|
||||
query->stereoTargets[1] = 0;
|
||||
query->eyeOffset[0] = Point3F::Zero;
|
||||
|
|
@ -376,12 +375,6 @@ bool GameProcessCameraQuery(CameraQuery *query)
|
|||
// Display may activate AFTER so we need to call this again just in case
|
||||
display->onStartFrame();
|
||||
|
||||
// The connection's display device may want to set the projection offset
|
||||
if(display->providesProjectionOffset())
|
||||
{
|
||||
query->projectionOffset = display->getProjectionOffset();
|
||||
}
|
||||
|
||||
// The connection's display device may want to set the eye offset
|
||||
if(display->providesEyeOffsets())
|
||||
{
|
||||
|
|
@ -398,6 +391,7 @@ bool GameProcessCameraQuery(CameraQuery *query)
|
|||
|
||||
// Grab the latest overriding render view transforms
|
||||
connection->getControlCameraEyeTransforms(display, query->eyeTransforms);
|
||||
connection->getControlCameraHeadTransform(display, &query->headMatrix);
|
||||
|
||||
display->getStereoViewports(query->stereoViewports);
|
||||
display->getStereoTargets(query->stereoTargets);
|
||||
|
|
@ -407,6 +401,7 @@ bool GameProcessCameraQuery(CameraQuery *query)
|
|||
{
|
||||
query->eyeTransforms[0] = query->cameraMatrix;
|
||||
query->eyeTransforms[1] = query->cameraMatrix;
|
||||
query->headMatrix = query->cameraMatrix;
|
||||
}
|
||||
|
||||
// Use the connection's FOV settings if requried
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue