early-access version 3177

This commit is contained in:
pineappleEA
2022-12-03 18:20:46 +01:00
parent adabab2740
commit f9e15ccbf6
31 changed files with 456 additions and 36 deletions
+14 -4
View File
@@ -237,8 +237,7 @@ private:
GRenderWindow* render_window;
};
class OpenGLRenderWidget : public RenderWidget {
public:
struct OpenGLRenderWidget : public RenderWidget {
explicit OpenGLRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
}
@@ -251,13 +250,16 @@ private:
std::unique_ptr<Core::Frontend::GraphicsContext> context;
};
class VulkanRenderWidget : public RenderWidget {
public:
struct VulkanRenderWidget : public RenderWidget {
explicit VulkanRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
windowHandle()->setSurfaceType(QWindow::VulkanSurface);
}
};
struct NullRenderWidget : public RenderWidget {
explicit NullRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {}
};
static Core::Frontend::WindowSystemType GetWindowSystemType() {
// Determine WSI type based on Qt platform.
QString platform_name = QGuiApplication::platformName();
@@ -878,6 +880,9 @@ bool GRenderWindow::InitRenderTarget() {
return false;
}
break;
case Settings::RendererBackend::Null:
InitializeNull();
break;
}
// Update the Window System information with the new render target
@@ -974,6 +979,11 @@ bool GRenderWindow::InitializeVulkan() {
return true;
}
void GRenderWindow::InitializeNull() {
child_widget = new NullRenderWidget(this);
main_context = std::make_unique<DummyContext>();
}
bool GRenderWindow::LoadOpenGL() {
auto context = CreateSharedContext();
auto scope = context->Acquire();