Add Metal support to Qt frontend and clean up renderer creation code (#795)
* Qt: Initial support for Metal renderer * Clean up graphics context code * Nits * More nits * Qt: Move screen-related stuff to own folder * Qt: Make screen widget polymorphic * Qt: Re-add Metal * Add factory for screen widget * Qt: Support compilation without Metal * Qt: Fix build without Metal * Oops * oops
This commit is contained in:
18
include/panda_qt/screen/screen_gl.hpp
Normal file
18
include/panda_qt/screen/screen_gl.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
|
||||
#include "gl/context.h"
|
||||
#include "panda_qt/screen/screen.hpp"
|
||||
|
||||
class ScreenWidgetGL : public ScreenWidget {
|
||||
std::unique_ptr<GL::Context> glContext = nullptr;
|
||||
|
||||
public:
|
||||
ScreenWidgetGL(API api, ResizeCallback resizeCallback, QWidget* parent = nullptr);
|
||||
|
||||
virtual GL::Context* getGLContext() override;
|
||||
virtual bool createContext() override;
|
||||
|
||||
virtual void resizeDisplay() override;
|
||||
virtual void resizeSurface(u32 width, u32 height) override;
|
||||
};
|
||||
Reference in New Issue
Block a user