mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
35 lines
502 B
C++
35 lines
502 B
C++
#pragma once
|
|
|
|
#include <QQuickItem>
|
|
|
|
class GLRenderer : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
GLRenderer() { }
|
|
|
|
void setViewportSize(const QSize &size) { m_viewportSize = size; }
|
|
|
|
public slots:
|
|
void paint();
|
|
|
|
private:
|
|
QSize m_viewportSize;
|
|
};
|
|
|
|
class GLViewer : public QQuickItem
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
GLViewer();
|
|
~GLViewer() { cleanup(); }
|
|
|
|
public slots:
|
|
void sync();
|
|
void cleanup();
|
|
|
|
private slots:
|
|
void handleWindowChanged(QQuickWindow *win);
|
|
|
|
private:
|
|
GLRenderer *m_renderer;
|
|
};
|