Debian Codegraph @

tests/manual/boundingvolumes/main.cpp

raw symbols SCIP
1 // Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 #include <QGuiApplication>
5 #include <QQuickView>
6
7 int main(int argc, char **argv)
8 {
9 {
10 // Set OpenGL requirements
11 QSurfaceFormat format = QSurfaceFormat::defaultFormat();
12 #if !QT_CONFIG(opengles2)
13 format.setVersion(4, 1);
14 format.setProfile(QSurfaceFormat::CoreProfile);
15 format.setSamples(4);
16 #else
17 format.setVersion(3, 0);
18 format.setProfile(QSurfaceFormat::NoProfile);
19 format.setRenderableType(QSurfaceFormat::OpenGLES);
20 #endif
21 QSurfaceFormat::setDefaultFormat(format);
22 }
23 QGuiApplication app(argc, argv);
24
25 QQuickView view;
26
27 view.resize(1024, 768);
28 view.setResizeMode(QQuickView::SizeRootObjectToView);
29 view.setSource(QUrl("qrc:/main.qml"));
30 view.show();
31
32 return app.exec();
33 }