mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-29 05:47:50 +02:00
Backend abstraction
This commit is contained in:
@ -7,20 +7,13 @@
|
||||
#include <gui/style.h>
|
||||
#include <credits.h>
|
||||
#include <gui/gui.h>
|
||||
#include <backend.h>
|
||||
|
||||
namespace LoadingScreen {
|
||||
GLFWwindow* _win;
|
||||
|
||||
void setWindow(GLFWwindow* win) {
|
||||
_win = win;
|
||||
}
|
||||
|
||||
void show(std::string msg) {
|
||||
glfwPollEvents();
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
backend::beginFrame();
|
||||
|
||||
ImGui::NewFrame();
|
||||
ImGui::Begin("Main", NULL, WINDOW_FLAGS);
|
||||
|
||||
|
||||
@ -46,14 +39,6 @@ namespace LoadingScreen {
|
||||
|
||||
ImGui::End();
|
||||
|
||||
ImGui::Render();
|
||||
int display_w, display_h;
|
||||
glfwGetFramebufferSize(_win, &display_w, &display_h);
|
||||
glViewport(0, 0, display_w, display_h);
|
||||
glClearColor(gui::themeManager.clearColor.x, gui::themeManager.clearColor.y, gui::themeManager.clearColor.z, gui::themeManager.clearColor.w);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
glfwSwapBuffers(_win);
|
||||
backend::render(false);
|
||||
}
|
||||
}
|
@ -2,9 +2,7 @@
|
||||
#include <thread>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
namespace LoadingScreen {
|
||||
void setWindow(GLFWwindow* win);
|
||||
void show(std::string msg);
|
||||
};
|
Reference in New Issue
Block a user