Base class code cleanup
This commit is contained in:
parent
c6cd406c6f
commit
52779a1bd1
4 changed files with 85 additions and 74 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Updated compute shader by Lukas Bergdoll (https://github.com/Voultapher)
|
||||
*
|
||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
||||
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
|
@ -553,8 +553,8 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
float normalizedMx = (mousePos.x - static_cast<float>(width / 2)) / static_cast<float>(width / 2);
|
||||
float normalizedMy = (mousePos.y - static_cast<float>(height / 2)) / static_cast<float>(height / 2);
|
||||
float normalizedMx = (mouseState.position.x - static_cast<float>(width / 2)) / static_cast<float>(width / 2);
|
||||
float normalizedMy = (mouseState.position.y - static_cast<float>(height / 2)) / static_cast<float>(height / 2);
|
||||
compute.uniformData.destX = normalizedMx;
|
||||
compute.uniformData.destY = normalizedMy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -793,10 +793,10 @@ public:
|
|||
io.DisplaySize = ImVec2((float)width, (float)height);
|
||||
io.DeltaTime = frameTimer;
|
||||
|
||||
io.MousePos = ImVec2(mousePos.x, mousePos.y);
|
||||
io.MouseDown[0] = mouseButtons.left && UIOverlay.visible;
|
||||
io.MouseDown[1] = mouseButtons.right && UIOverlay.visible;
|
||||
io.MouseDown[2] = mouseButtons.middle && UIOverlay.visible;
|
||||
io.MousePos = ImVec2(mouseState.position.x, mouseState.position.y);
|
||||
io.MouseDown[0] = mouseState.buttons.left && UIOverlay.visible;
|
||||
io.MouseDown[1] = mouseState.buttons.right && UIOverlay.visible;
|
||||
io.MouseDown[2] = mouseState.buttons.middle && UIOverlay.visible;
|
||||
|
||||
draw();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue