Merge branch 'finding-sany2' into gui

This commit is contained in:
djaidjai committed 2025-01-20 13:26:07 +01:00
commit 26c1d0ff83
13 files changed
+148 -29

No files matched your search

+6
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";
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.