Commit 12804106 authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Janne Koskinen

Fix demos for 2.0

Use runtime2 and correct surface format.

Task-number: QT3DS-1646
parent c585824a
......@@ -12,7 +12,7 @@ KNX_BOARD {
CONFIG += c++11
}
QT += qml quick
QT += qml quick 3dstudioruntime2
CONFIG += resources_big
......
......@@ -59,6 +59,7 @@
#if defined(KNX_BACKEND)
#include "qmlknxdemo.h"
#endif
#include <q3dsruntimeglobal.h>
// Uncomment for 1280x900 window
//#define FIXEDWINDOW
......@@ -75,18 +76,10 @@ int applyRatio(const int value, const int ratio)
int main(int argc, char *argv[])
{
#if defined(Q_OS_MACOS)
QSurfaceFormat openGLFormat;
openGLFormat.setRenderableType(QSurfaceFormat::OpenGL);
openGLFormat.setProfile(QSurfaceFormat::CoreProfile);
openGLFormat.setMajorVersion(4);
openGLFormat.setMinorVersion(1);
openGLFormat.setStencilBufferSize(8);
QSurfaceFormat::setDefaultFormat(openGLFormat);
#endif
QGuiApplication app(argc, argv);
QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());
// Define size variants for scaling
qreal refDpi = 96.;
qreal refWidth = 1280.;
......
......@@ -50,7 +50,7 @@
import QtQuick 2.8
import QtQuick.Controls 2.1
import QtStudio3D 1.1
import QtStudio3D 2.0
Item {
id: home
......
TEMPLATE = app
QT += qml quick
QT += qml quick 3dstudioruntime2
target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET
INSTALLS += target
......
......@@ -53,24 +53,17 @@
#include <QtQuick/QQuickView>
#include <QtQml/QQmlEngine>
#include <QtGui/QFontDatabase>
#include <q3dsruntimeglobal.h>
int main(int argc, char *argv[])
{
#if defined(Q_OS_MACOS)
QSurfaceFormat openGLFormat;
openGLFormat.setRenderableType(QSurfaceFormat::OpenGL);
openGLFormat.setProfile(QSurfaceFormat::CoreProfile);
openGLFormat.setMajorVersion(4);
openGLFormat.setMinorVersion(1);
openGLFormat.setStencilBufferSize(8);
QSurfaceFormat::setDefaultFormat(openGLFormat);
#endif
qputenv("QML_DISABLE_DISK_CACHE", "true");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());
QQuickView viewer;
QFontDatabase::addApplicationFont("qrc:/qml/fonts/TitilliumWeb-SemiBold.ttf");
......
......@@ -49,7 +49,7 @@
****************************************************************************/
import QtQuick 2.9
import QtStudio3D 1.1
import QtStudio3D 2.0
import QtQuick.Controls 2.1
Item {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment