mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-04 14:48:37 +00:00
feat: set opengl version 2.0
This commit is contained in:
parent
3007069592
commit
b2cf0b9c2a
1 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <QTcpServer>
|
#include <QTcpServer>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QSurfaceFormat>
|
||||||
|
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
|
@ -49,6 +50,19 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
|
||||||
|
QSurfaceFormat varFormat = QSurfaceFormat::defaultFormat();
|
||||||
|
varFormat.setVersion(2, 0);
|
||||||
|
varFormat.setProfile(QSurfaceFormat::NoProfile);
|
||||||
|
/*
|
||||||
|
varFormat.setSamples(4);
|
||||||
|
varFormat.setAlphaBufferSize(8);
|
||||||
|
varFormat.setBlueBufferSize(8);
|
||||||
|
varFormat.setRedBufferSize(8);
|
||||||
|
varFormat.setGreenBufferSize(8);
|
||||||
|
varFormat.setDepthBufferSize(24);
|
||||||
|
*/
|
||||||
|
QSurfaceFormat::setDefaultFormat(varFormat);
|
||||||
|
|
||||||
g_oldMessageHandler = qInstallMessageHandler(myMessageOutput);
|
g_oldMessageHandler = qInstallMessageHandler(myMessageOutput);
|
||||||
Stream::init();
|
Stream::init();
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue