mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Other key can now be pressed without accum reset
This commit is contained in:
@ -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;
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user