mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-10 12:39:59 +00:00
Files clean up
This commit is contained in:
parent
fa6fd5980e
commit
758f1bcdee
@ -1,13 +1,15 @@
|
||||
#ifdef QT_UI
|
||||
#include "glviewer.h"
|
||||
#include <QQuickWindow>
|
||||
#include <QOpenGLContext>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "glviewer.h"
|
||||
|
||||
// This class hooks beforeRendering and allows us to draw a scene and reset GL state.
|
||||
// In future, we will likely want to manually control the update rate.
|
||||
|
||||
void GLRenderer::paint() {
|
||||
void GLRenderer::paint()
|
||||
{
|
||||
// Do GL here
|
||||
glViewport(0, 0, m_viewportSize.width(), m_viewportSize.height());
|
||||
|
||||
@ -48,7 +50,8 @@ void GLViewer::sync()
|
||||
m_renderer->setViewportSize(window()->size() * window()->devicePixelRatio());
|
||||
}
|
||||
|
||||
void GLViewer::cleanup() {
|
||||
void GLViewer::cleanup()
|
||||
{
|
||||
if (m_renderer) {
|
||||
delete m_renderer;
|
||||
m_renderer = 0;
|
||||
|
@ -2,18 +2,19 @@
|
||||
|
||||
#include <QQuickItem>
|
||||
|
||||
class GLRenderer : public QObject {
|
||||
Q_OBJECT
|
||||
class GLRenderer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GLRenderer() { }
|
||||
GLRenderer() { }
|
||||
|
||||
void setViewportSize(const QSize &size) { m_viewportSize = size; }
|
||||
void setViewportSize(const QSize &size) { m_viewportSize = size; }
|
||||
|
||||
public slots:
|
||||
void paint();
|
||||
void paint();
|
||||
|
||||
private:
|
||||
QSize m_viewportSize;
|
||||
QSize m_viewportSize;
|
||||
};
|
||||
|
||||
class GLViewer : public QQuickItem
|
||||
|
@ -3,6 +3,7 @@
|
||||
#ifdef QT_UI
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#include "glviewer.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -13,6 +14,5 @@ int main(int argc, char *argv[])
|
||||
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
|
||||
|
||||
return app.exec();
|
||||
Q_UNUSED(engine)
|
||||
}
|
||||
#endif
|
||||
|
@ -8,6 +8,7 @@ ApplicationWindow {
|
||||
title: qsTr("RPCS3 Qt")
|
||||
width: Screen.desktopAvailableWidth / 2
|
||||
height: Screen.desktopAvailableHeight / 2
|
||||
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("&Boot")
|
||||
@ -46,7 +47,9 @@ ApplicationWindow {
|
||||
MenuItem { text: qsTr("&About...") }
|
||||
}
|
||||
}
|
||||
|
||||
GLViewer {}
|
||||
|
||||
Rectangle {
|
||||
color: Qt.rgba(0, 0.5, 0.35);
|
||||
height: Math.round(parent.height / 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user