mirror of https://github.com/bjornbytes/lovr.git
Fix OpenXR view matrix;
This commit is contained in:
parent
25d7319605
commit
c6b4981389
|
@ -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 New Issue