diff options
author | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
commit | 182c8f8357739f905bbd721006480502435b6b43 (patch) | |
tree | 082613a474d863182e2ad8f2167f1643f26e67a3 /app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp | |
parent | b01ed99a1cd0c863c8709930658513c04dd70f61 (diff) |
Update brace style to match rest of my projectscplt-imgui
Diffstat (limited to 'app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp')
-rw-r--r-- | app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp b/app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp index 9a7d67f..c2b6e20 100644 --- a/app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp +++ b/app/source/Cplt/ImGuiBackend/Backend_OpenGL3.cpp @@ -13,14 +13,12 @@ # define IMGUI_IMPL_OPENGL_LOADER_CUSTOM # include <backend/imgui_impl_opengl3.cpp> -class OpenGL3Backend : public RenderingBackend -{ +class OpenGL3Backend : public RenderingBackend { private: GLFWwindow* mWindow; public: - OpenGL3Backend() - { + OpenGL3Backend() { glfwSetErrorCallback(&GlfwErrorCallback); if (!glfwInit()) { throw std::runtime_error("Failed to initialize GLFW."); @@ -60,8 +58,7 @@ public: ImGui_ImplOpenGL3_Init(glslVersion); } - virtual ~OpenGL3Backend() - { + virtual ~OpenGL3Backend() { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); @@ -70,8 +67,7 @@ public: glfwTerminate(); } - virtual void RunUntilWindowClose(void (*windowContent)()) - { + virtual void RunUntilWindowClose(void (*windowContent)()) { while (!glfwWindowShouldClose(mWindow)) { glfwPollEvents(); @@ -96,14 +92,12 @@ public: } } - static void GlfwErrorCallback(int errorCode, const char* message) - { + static void GlfwErrorCallback(int errorCode, const char* message) { std::cerr << "GLFW Error " << errorCode << ": " << message << "\n"; } }; -std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL3Backend() -{ +std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL3Backend() { try { return std::make_unique<OpenGL3Backend>(); } catch (std::exception& e) { @@ -113,8 +107,7 @@ std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL3Backend() #else // ^^ BUILD_CORE_WITH_OPENGL3_BACKEND | !BUILD_CORE_WITH_OPENGL3_BACKEND vv -std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL3Backend() -{ +std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL3Backend() { return nullptr; } |