mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
Better GL screen widget, initialize it to red as a test
This commit is contained in:
parent
b8032c8286
commit
45a80c9e39
3 changed files with 36 additions and 19 deletions
|
@ -10,20 +10,7 @@ class ScreenWidget : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScreenWidget(QWidget* parent = nullptr) : QWidget(parent) {
|
||||
// Create a native window for use with our graphics API of choice
|
||||
setAutoFillBackground(false);
|
||||
setAttribute(Qt::WA_NativeWindow, true);
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_PaintOnScreen, true);
|
||||
setAttribute(Qt::WA_KeyCompression, false);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setMouseTracking(true);
|
||||
|
||||
if (!createGLContext()) {
|
||||
Helpers::panic("Failed to create GL context for display");
|
||||
}
|
||||
}
|
||||
ScreenWidget(QWidget* parent = nullptr);
|
||||
|
||||
private:
|
||||
std::unique_ptr<GL::Context> glContext = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue