diff --git a/Qt/QtHost.cpp b/Qt/QtHost.cpp index 88b6c95ae3..1003a7c110 100644 --- a/Qt/QtHost.cpp +++ b/Qt/QtHost.cpp @@ -12,6 +12,7 @@ #include "UI/EmuScreen.h" #include "UI/UIShader.h" #include "UI/ui_atlas.h" +#include "ui/ui_context.h" #include "GPU/ge_constants.h" #include "EmuThread.h" @@ -221,7 +222,6 @@ int NativeMix(short *audio, int num_samples) void NativeInitGraphics() { - INFO_LOG(BOOT, "NativeInitGraphics - should only be called once!"); gl_lost_manager_init(); ui_draw2d.SetAtlas(&ui_atlas); @@ -245,6 +245,9 @@ void NativeInitGraphics() theme.checkOn = I_CHECKEDBOX; theme.checkOff = I_SQUARE; + ui_draw2d.Init(); + ui_draw2d_front.Init(); + UIInit(&ui_atlas, theme); uiTexture = new Texture(); @@ -254,6 +257,9 @@ void NativeInitGraphics() } uiTexture->Bind(0); + uiContext = new UIContext(); + uiContext->Init(UIShader_Get(), UIShader_GetPlain(), uiTexture, &ui_draw2d, &ui_draw2d_front); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -294,6 +300,9 @@ void NativeShutdownGraphics() delete screenManager; screenManager = 0; + ui_draw2d.Shutdown(); + ui_draw2d_front.Shutdown(); + UIShader_Shutdown(); gl_lost_manager_shutdown(); diff --git a/native b/native index 2b32a7115e..8e06b06d7e 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 2b32a7115eb09b90593943481130d5d748e51040 +Subproject commit 8e06b06d7efb3299d8c6139651d99616273d6aa7