OpenGL error output in debug window + highdpi mode test
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <GL/glew.h>
|
||||
#include <iostream>
|
||||
#include "screens/GameScreen.h"
|
||||
#include "Utility.h"
|
||||
|
||||
DarkRP2D::~DarkRP2D() {
|
||||
std::cout << "Game got destroyed!" << std::endl;
|
||||
@@ -76,12 +77,6 @@ void DarkRP2D::update(unsigned int delta) {
|
||||
gameScreen->update();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool show_demo_window = true;
|
||||
bool show_another_window = false;
|
||||
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
||||
#endif
|
||||
|
||||
void DarkRP2D::render(unsigned int delta) {
|
||||
renderer->clear();
|
||||
#ifndef NDEBUG
|
||||
@@ -97,18 +92,21 @@ void DarkRP2D::render(unsigned int delta) {
|
||||
#ifndef NDEBUG
|
||||
// 1. Show a simple window.
|
||||
// Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
|
||||
static bool ShowOpenGLLogger = false;
|
||||
{
|
||||
static float f = 0.0f;
|
||||
static int counter = 0;
|
||||
ImGui::Text("-------------------OpenGL Info-------------------------");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("\t\t\t\t\tOpenGL Info");
|
||||
ImGui::Text("GLEW Version: %s\n", glewGetString(GLEW_VERSION));
|
||||
ImGui::Text(" Version: %s\n", glGetString(GL_VERSION));
|
||||
ImGui::Text(" Vendor: %s\n", glGetString(GL_VENDOR));
|
||||
ImGui::Text(" Renderer: %s\n", glGetString(GL_RENDERER));
|
||||
ImGui::Text(" Shading: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
ImGui::Text("----------------------------------------------------------");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
|
||||
ImGui::Checkbox("Show OpenGL Logger", &ShowOpenGLLogger);
|
||||
}
|
||||
if(ShowOpenGLLogger)
|
||||
Utility::Debug::openGLLogger.Draw("OpenGL Logger");
|
||||
|
||||
ImGui::Render();
|
||||
ImGui_ImplSdlGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
Reference in New Issue
Block a user