Skip to content

Commit b16ec19

Browse files
committed
GPU Display: Some fixes to alternate camera modes (ctrl / alt pressed)
1 parent af57c99 commit b16ec19

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

GPU/GPUTracking/display/GPUDisplay.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,10 @@ int GPUDisplay::DrawGLScene_internal(bool mixAnimation, float mAnimateTime)
15421542
mXYZ[2] = r2 * sinf(phi);
15431543
mXYZ[1] = r * sinf(theta);
15441544

1545-
nextViewMatrix = HMM_LookAt({mXYZ[0], mXYZ[1], mXYZ[2]}, {0, 0, 0}, {0, 1, 0});
1545+
if (yUp) {
1546+
nextViewMatrix = MY_HMM_IDENTITY;
1547+
}
1548+
nextViewMatrix = nextViewMatrix * HMM_LookAt({mXYZ[0], mXYZ[1], mXYZ[2]}, {0, 0, 0}, {0, 1, 0});
15461549
} else {
15471550
nextViewMatrix = nextViewMatrix * HMM_Translate({moveX, moveY, moveZ});
15481551
if (rotYaw != 0.f) {

GPU/GPUTracking/display/GPUDisplayBackendX11.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int GPUDisplayBackendX11::GetKey(int key)
3636
if (key == 65505 || key == 65506) {
3737
return (KEY_SHIFT);
3838
}
39-
if (key == 65513 || key == 65027) {
39+
if (key == 65513 || key == 65027 || key == 65511) {
4040
return (KEY_ALT);
4141
}
4242
if (key == 65507 || key == 65508) {

0 commit comments

Comments
 (0)