diff --git a/src/Camera.h b/src/Camera.h index fe0d730..a10bc11 100644 --- a/src/Camera.h +++ b/src/Camera.h @@ -7,7 +7,7 @@ class OrtographicCamera { private: glm::vec2 cameraPos; - float zoom = 0.01f; + float zoom = 0.05f; public: OrtographicCamera() : cameraPos(glm::vec2(-5.0f,-5.0f)) {} diff --git a/src/DarkRP2D.cpp b/src/DarkRP2D.cpp index f5affb7..4c98be0 100644 --- a/src/DarkRP2D.cpp +++ b/src/DarkRP2D.cpp @@ -116,22 +116,16 @@ void DarkRP2D::render(unsigned int delta) { { static float f = 0.0f; static int counter = 0; - ImGui::Text("Hello, world!"); // Display some text (you can use a format string too) - ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f - ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color - - ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state - ImGui::Checkbox("Another Window", &show_another_window); - - if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated) - counter++; - ImGui::SameLine(); - ImGui::Text("counter = %d", counter); - + ImGui::Text("-------------------OpenGL 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::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); } - ImGui::Render(); ImGui_ImplSdlGL3_RenderDrawData(ImGui::GetDrawData()); #endif diff --git a/src/DesktopLauncher.cpp b/src/DesktopLauncher.cpp index a45899a..aa693b8 100755 --- a/src/DesktopLauncher.cpp +++ b/src/DesktopLauncher.cpp @@ -88,15 +88,7 @@ bool initSDL() { if (GLEW_KHR_debug) { Utility::printInfo(Utility::GLEW, "Supporting KHR debug output!"); } - //Print OpenGL version - printf("----------------------OpenGL Info----------------------------\n"); - printf("Glew Version: %s\n", glewGetString(GLEW_VERSION)); - printf(" Version: %s\n", glGetString(GL_VERSION)); - printf(" Vendor: %s\n", glGetString(GL_VENDOR)); - printf(" Renderer: %s\n", glGetString(GL_RENDERER)); - printf(" Shading: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); - printf("----------------------------------------------------------------\n"); - + if(glDebugMessageCallback) { glEnable(GL_DEBUG_OUTPUT); Utility::printInfo(Utility::OpenGL, "Register OpenGL debug callback"); diff --git a/src/DesktopLauncher.h b/src/DesktopLauncher.h index 4b92fb9..80e6fb1 100644 --- a/src/DesktopLauncher.h +++ b/src/DesktopLauncher.h @@ -1,6 +1,8 @@ #ifndef DESKTOPLAUNCHER_H #define DESKTOPLAUNCHER_H +#include + namespace Game { #define WINDOW_WIDTH = 800; diff --git a/src/Texture.cpp b/src/Texture.cpp index 1b0480b..26066ff 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -15,6 +15,8 @@ void Texture2D::Generate(GLuint width, GLuint height, unsigned char* data) { // Create Texture glBindTexture(GL_TEXTURE_2D, this->ID); glTexImage2D(GL_TEXTURE_2D, 0, this->Internal_Format, width, height, 0, this->Image_Format, GL_UNSIGNED_BYTE, data); + glGenerateMipmap(GL_TEXTURE_2D); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); // Set Texture wrap and filter modes glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, this->Wrap_S); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, this->Wrap_T);