print gpu in debug window
parent
62212a22ab
commit
0560fd43c6
|
@ -1,6 +1,9 @@
|
||||||
#ifndef MAIN_H
|
#ifndef MAIN_H
|
||||||
#define MAIN_H
|
#define MAIN_H
|
||||||
|
|
||||||
|
#include <glad/glad.h>
|
||||||
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
void framebuffer_size_callback(GLFWwindow *, int, int);
|
void framebuffer_size_callback(GLFWwindow *, int, int);
|
||||||
void mouse_callback(GLFWwindow *window, double xpos, double ypos);
|
void mouse_callback(GLFWwindow *window, double xpos, double ypos);
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,9 @@ namespace debug{
|
||||||
ImGui::Text("FPS: %d", std::any_cast<int>(parameters.at("fps")));
|
ImGui::Text("FPS: %d", std::any_cast<int>(parameters.at("fps")));
|
||||||
ImGui::Text("Frametime (ms): %f",
|
ImGui::Text("Frametime (ms): %f",
|
||||||
std::any_cast<float>(parameters.at("frametime"))*1000);
|
std::any_cast<float>(parameters.at("frametime"))*1000);
|
||||||
|
ImGui::Text("GPU: (%s) %s",
|
||||||
|
std::any_cast<const GLubyte*>(parameters.at("gpu_vendor")),
|
||||||
|
std::any_cast<const GLubyte*>(parameters.at("gpu_renderer")));
|
||||||
//ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr);
|
//ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
#include <glad/glad.h>
|
|
||||||
#include <GLFW/glfw3.h>
|
|
||||||
|
|
||||||
#include "main.hpp"
|
#include "main.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include "main.hpp"
|
|
||||||
|
|
||||||
#define GLOBALS_DEFINER
|
#define GLOBALS_DEFINER
|
||||||
#include "globals.hpp"
|
#include "globals.hpp"
|
||||||
#undef GLOBALS_DEFINER
|
#undef GLOBALS_DEFINER
|
||||||
|
@ -60,9 +55,9 @@ int main()
|
||||||
//glEnable(GL_FRAMEBUFFER_SRGB); //gamma correction done in fragment shader
|
//glEnable(GL_FRAMEBUFFER_SRGB); //gamma correction done in fragment shader
|
||||||
//glEnable(GL_CULL_FACE); //GL_BACK GL_CCW by default
|
//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++){
|
for(int i = 0; i < 360; i++){
|
||||||
sines[i] = sin(3.14 / 180 * i);
|
sines[i] = sin(3.14 / 180 * i);
|
||||||
cosines[i] = cos(3.14 / 180 * i);
|
cosines[i] = cos(3.14 / 180 * i);
|
||||||
|
|
Loading…
Reference in New Issue