mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-03 13:03:38 +00:00
Fix OpenXR view matrix;
This commit is contained in:
parent
81065a6e6b
commit
362e5525e7
|
@ -803,7 +803,7 @@ static void openxr_renderTo(void (*callback)(void*), void* userdata) {
|
||||||
float viewMatrix[16];
|
float viewMatrix[16];
|
||||||
XrView* view = &views[eye];
|
XrView* view = &views[eye];
|
||||||
mat4_fromQuat(viewMatrix, &view->pose.orientation.x);
|
mat4_fromQuat(viewMatrix, &view->pose.orientation.x);
|
||||||
memcpy(viewMatrix, &view->pose.position.x, 3 * sizeof(float));
|
memcpy(viewMatrix + 12, &view->pose.position.x, 3 * sizeof(float));
|
||||||
mat4_invert(viewMatrix);
|
mat4_invert(viewMatrix);
|
||||||
lovrGraphicsSetViewMatrix(eye, viewMatrix);
|
lovrGraphicsSetViewMatrix(eye, viewMatrix);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue