diff --git a/include/main.hpp b/include/main.hpp index 35e69e7..c37d05d 100644 --- a/include/main.hpp +++ b/include/main.hpp @@ -1,6 +1,9 @@ #ifndef MAIN_H #define MAIN_H +#include +#include + void framebuffer_size_callback(GLFWwindow *, int, int); void mouse_callback(GLFWwindow *window, double xpos, double ypos); diff --git a/src/debugwindow.cpp b/src/debugwindow.cpp index e1293c9..9d43197 100644 --- a/src/debugwindow.cpp +++ b/src/debugwindow.cpp @@ -69,6 +69,9 @@ namespace debug{ ImGui::Text("FPS: %d", std::any_cast(parameters.at("fps"))); ImGui::Text("Frametime (ms): %f", std::any_cast(parameters.at("frametime"))*1000); + ImGui::Text("GPU: (%s) %s", + std::any_cast(parameters.at("gpu_vendor")), + std::any_cast(parameters.at("gpu_renderer"))); //ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr); } diff --git a/src/main.cpp b/src/main.cpp index da3507f..b8e0f9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,13 +1,8 @@ -#include -#include - #include "main.hpp" #include #include -#include "main.hpp" - #define GLOBALS_DEFINER #include "globals.hpp" #undef GLOBALS_DEFINER @@ -60,9 +55,9 @@ int main() //glEnable(GL_FRAMEBUFFER_SRGB); //gamma correction done in fragment shader //glEnable(GL_CULL_FACE); //GL_BACK GL_CCW by default - std::cout << "Using GPU: " << glGetString(GL_VENDOR) << " " << glGetString(GL_RENDERER) << "\n"; + debug::window::set_parameter("gpu_vendor", glGetString(GL_VENDOR)); + debug::window::set_parameter("gpu_renderer", glGetString(GL_RENDERER)); - wireframe = false; for(int i = 0; i < 360; i++){ sines[i] = sin(3.14 / 180 * i); cosines[i] = cos(3.14 / 180 * i);