mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +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 <QTranslator>
|
||||
#include <QFile>
|
||||
#include <QSurfaceFormat>
|
||||
|
||||
#include "dialog.h"
|
||||
#include "stream.h"
|
||||
|
@ -49,6 +50,19 @@ int main(int argc, char *argv[])
|
|||
|
||||
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);
|
||||
Stream::init();
|
||||
QApplication a(argc, argv);
|
||||
|
|
Loading…
Add table
Reference in a new issue