Merge branch 'finding-sany2' into gui

This commit is contained in:
2025-01-20 13:26:07 +01:00
13 changed files with 148 additions and 29 deletions

View File

@@ -7,6 +7,7 @@
#include "Shader.h"
#include "input/Widget.h"
#include "cuda_error.h"
Window::Window(unsigned int w, unsigned int h) {
@@ -98,6 +99,7 @@ void Window::free(float* data) {
void Window::tick() {
std::cout << "tick tick\n";
// manually track time diff
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
float diff = (float) std::chrono::duration_cast<std::chrono::milliseconds>(now - this->last_frame).count();
@@ -111,6 +113,7 @@ void Window::tick() {
this->widget->dateChanged = false;
}
std::cout << "setting tick render\n";
// tick render
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glDisable(GL_DEPTH_TEST);
@@ -138,11 +141,14 @@ void Window::tick() {
glDrawArrays(GL_TRIANGLES, 0, 6); // draw current frame to texture
// render ImGui context
std::cout << "rendering\n";
this->widget->render();
std::cout << "done rendering\n";
// check for events
glfwSwapBuffers(this->window);
glfwPollEvents();
std::cout << "done tick tick\n";
}