Fixed vgcore not compiling on gcc

This commit is contained in:
DJMrTV 2023-08-30 21:44:02 +02:00
commit 3c6074da23

View file

@ -24,7 +24,7 @@ namespace Graphics {
VREGISTRY(MenuSortSetter) VREGISTRY(MenuSortSetter)
VREGISTRY(InitAction) VREGISTRY(InitAction)
void Graphics::Init() { void Init() {
Running = true; Running = true;
if (!glfwInit()) { if (!glfwInit()) {
throw std::runtime_error("Could not Initialize glfw"); throw std::runtime_error("Could not Initialize glfw");
@ -33,7 +33,7 @@ namespace Graphics {
MWheel = 1.0f; MWheel = 1.0f;
} }
void Graphics::BeginLoop() { void BeginLoop() {
while (Running) { while (Running) {
ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame(); ImGui_ImplGlfw_NewFrame();
@ -48,19 +48,19 @@ namespace Graphics {
} }
} }
void Graphics::Terminate() { void Terminate() {
ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown(); ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext(); ImGui::DestroyContext();
glfwTerminate(); glfwTerminate();
} }
void Graphics::EnableVsync() { void EnableVsync() {
glfwMakeContextCurrent(window->GetGlfwWindow()); glfwMakeContextCurrent(window->GetGlfwWindow());
glfwSwapInterval(1); glfwSwapInterval(1);
} }
void Graphics::AutoInit(std::string name) { void AutoInit(std::string name) {
VMirror::getAssemblyRegistry()->selfRegister(getVGCoreAssemblyInfo()); VMirror::getAssemblyRegistry()->selfRegister(getVGCoreAssemblyInfo());