+ | Other key can now be pressed without accum reset

This commit is contained in:
TheRedShip
2025-01-11 00:36:52 +01:00
parent 722318b6d1
commit a46404d91d
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ int main(int argc, char **argv)
if (argc <= 1 || !scene.parseScene(argv[1]))
return (1);
Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 5);
Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 0);
Shader shader("shaders/vertex.vert", "shaders/frag.frag", "shaders/compute.glsl");
GLint max_gpu_size;

View File

@ -99,7 +99,7 @@ void Window::mouseButtonCallback(GLFWwindow* window, int button, int action, int
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
(void) win; (void) button; (void) mods;
if (action == GLFW_RELEASE)
if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_RELEASE)
{
win->_frameCount = 0;
}
@ -120,8 +120,6 @@ void Window::keyCallback(GLFWwindow *window, int key, int scancode, int action,
<< dov.x << " " << dov.y << " " << "\t"
<< std::endl;
}
if (action == GLFW_RELEASE)
win->_frameCount = 0;
}
void Window::display()
@ -136,6 +134,9 @@ void Window::display()
_frameCount++;
if (_scene->getCamera()->getVelocity() > 0.0f)
_frameCount = 0;
glfwSwapBuffers(_window);
}
void Window::pollEvents()