Commit 7f67fa15 authored by Tomi Korpipää's avatar Tomi Korpipää

Fix LowEndCluster for macOS

parent ce29cdf5
...@@ -9,27 +9,27 @@ ...@@ -9,27 +9,27 @@
<Layer id="Layer" variants="" > <Layer id="Layer" variants="" >
<Camera id="Camera" /> <Camera id="Camera" />
<Component id="Car" > <Component id="Car" >
<Model id="Car_001" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="models/lowPolyCar/meshes/polySurface3.mesh" > <Model id="Car_001" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="../models/lowPolyCar/meshes/polySurface3.mesh" >
<ReferencedMaterial id="lowpolyCoupeRed" /> <ReferencedMaterial id="lowpolyCoupeRed" />
</Model> </Model>
</Component> </Component>
<Component id="Plane" > <Component id="Plane" >
<Model id="Plane_001" name="Plane" importid="Plane" orientation="Right Handed" position="0 0 -0" rotation="-90 -0 0" rotationorder="XYZr" scale="100 100 100" sourcepath="models/road/meshes/Plane.mesh" > <Model id="Plane_001" name="Plane" importid="Plane" orientation="Right Handed" position="0 0 -0" rotation="-90 -0 0" rotationorder="XYZr" scale="100 100 100" sourcepath="../models/road/meshes/Plane.mesh" >
<Material id="Plane_Diffuse_Default" name="Plane_Diffuse_Default" > <Material id="Plane_Diffuse_Default" name="Plane_Diffuse_Default" >
<Image id="Plane_Diffuse_Default_diffusemap" /> <Image id="Plane_Diffuse_Default_diffusemap" />
</Material> </Material>
</Model> </Model>
</Component> </Component>
<Model id="Car2" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="models/lowPolyCar/meshes/polySurface3.mesh" > <Model id="Car2" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="../models/lowPolyCar/meshes/polySurface3.mesh" >
<ReferencedMaterial id="lowpolyCoupe" /> <ReferencedMaterial id="lowpolyCoupe" />
</Model> </Model>
<Model id="Car3" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="models/lowPolyCar/meshes/polySurface3.mesh" > <Model id="Car3" name="polySurface3" importid="polySurface3" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="../models/lowPolyCar/meshes/polySurface3.mesh" >
<ReferencedMaterial id="lowpolyCoupe_001" /> <ReferencedMaterial id="lowpolyCoupe_001" />
</Model> </Model>
</Layer> </Layer>
<Material id="__Container" > <Material id="__Container" >
<Material id="materials/lowpolyCoupe" name="lowpolyCoupe" blendmode="Normal" diffuse="1 1 1" diffusemap="#materials/lowpolyCoupe_diffusemap" emissivepower="0" importfile="models/lowPolyCar/lowPolyCar.import" importid="lowpolyCoupe" opacity="100" specularamount="0" > <Material id="materials/lowpolyCoupe" name="lowpolyCoupe" blendmode="Normal" diffuse="1 1 1" diffusemap="#materials/lowpolyCoupe_diffusemap" emissivepower="0" importfile="../models/lowPolyCar/lowPolyCar.import" importid="lowpolyCoupe" opacity="100" specularamount="0" >
<Image id="materials/lowpolyCoupe_diffusemap" name="lowpolyCoupe_diffusemap" importid="lowpolyCoupe_diffusemap" pivotu="0.5" pivotv="0.5" positionu="-0.5" positionv="-0.5" scaleu="1" scalev="1" sourcepath="models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.psd" tilingmodehorz="Tiled" tilingmodevert="Tiled" /> <Image id="materials/lowpolyCoupe_diffusemap" name="lowpolyCoupe_diffusemap" importid="lowpolyCoupe_diffusemap" pivotu="0.5" pivotv="0.5" positionu="-0.5" positionv="-0.5" scaleu="1" scalev="1" sourcepath="../models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.psd" tilingmodehorz="Tiled" tilingmodevert="Tiled" />
</Material> </Material>
<Material id="materials/lowpolyCoupeRed" > <Material id="materials/lowpolyCoupeRed" >
<Image id="materials/lowpolyCoupeRed_diffusemap" /> <Image id="materials/lowpolyCoupeRed_diffusemap" />
...@@ -58,19 +58,19 @@ ...@@ -58,19 +58,19 @@
<Set ref="#Camera" endtime="44000" /> <Set ref="#Camera" endtime="44000" />
<Add ref="#Car" name="Car" controlledproperty="$carSlide @slide" endtime="44000" position="0 0 -41" /> <Add ref="#Car" name="Car" controlledproperty="$carSlide @slide" endtime="44000" position="0 0 -41" />
<Add ref="#Plane" name="Plane" endtime="44000" /> <Add ref="#Plane" name="Plane" endtime="44000" />
<Add ref="#Car2" name="Car2" endtime="44000" importfile="models/lowPolyCar/lowPolyCar.import" position="223.317 0 352.63" rotation="0 180 0" /> <Add ref="#Car2" name="Car2" endtime="44000" importfile="../models/lowPolyCar/lowPolyCar.import" position="223.317 0 352.63" rotation="0 180 0" />
<Add ref="#lowpolyCoupe" name="lowpolyCoupe" endtime="44000" referencedmaterial="#materials/lowpolyCoupe" sourcepath="materials/lowpolyCoupe.materialdef" /> <Add ref="#lowpolyCoupe" name="lowpolyCoupe" endtime="44000" referencedmaterial="#materials/lowpolyCoupe" sourcepath="../materials/lowpolyCoupe.materialdef" />
<Add ref="#Car3" name="Car3" endtime="44000" importfile="models/lowPolyCar/lowPolyCar.import" position="-218.659 0 677.935" rotation="0 180 0" /> <Add ref="#Car3" name="Car3" endtime="44000" importfile="../models/lowPolyCar/lowPolyCar.import" position="-218.659 0 677.935" rotation="0 180 0" />
<Add ref="#lowpolyCoupe_001" name="lowpolyCoupe" endtime="44000" referencedmaterial="#materials/lowpolyCoupe" sourcepath="materials/lowpolyCoupe.materialdef" /> <Add ref="#lowpolyCoupe_001" name="lowpolyCoupe" endtime="44000" referencedmaterial="#materials/lowpolyCoupe" sourcepath="../materials/lowpolyCoupe.materialdef" />
</State> </State>
</State> </State>
<State name="Master Slide" component="#Car" > <State name="Master Slide" component="#Car" >
<Add ref="#Car_001" name="Car" endtime="12000" importfile="models/lowPolyCar/lowPolyCar.import" position="1.99085e-05 0 -227.727" rotation="0 180 0" > <Add ref="#Car_001" name="Car" endtime="12000" importfile="../models/lowPolyCar/lowPolyCar.import" position="1.99085e-05 0 -227.727" rotation="0 180 0" >
<AnimationTrack property="position.x" type="EaseInOut" /> <AnimationTrack property="position.x" type="EaseInOut" />
<AnimationTrack property="position.y" type="EaseInOut" /> <AnimationTrack property="position.y" type="EaseInOut" />
<AnimationTrack property="position.z" type="EaseInOut" /> <AnimationTrack property="position.z" type="EaseInOut" />
</Add> </Add>
<Add ref="#lowpolyCoupeRed" name="lowpolyCoupeRed" endtime="12000" referencedmaterial="#materials/lowpolyCoupeRed" sourcepath="materials/lowpolyCoupeRed.materialdef" /> <Add ref="#lowpolyCoupeRed" name="lowpolyCoupeRed" endtime="12000" referencedmaterial="#materials/lowpolyCoupeRed" sourcepath="../materials/lowpolyCoupeRed.materialdef" />
<State id="Car-Top" name="Top" playmode="Looping" > <State id="Car-Top" name="Top" playmode="Looping" >
<Set ref="#Car_001" endtime="18790" position="1.99085e-05 0 -227.727" > <Set ref="#Car_001" endtime="18790" position="1.99085e-05 0 -227.727" >
<AnimationTrack property="position.x" type="EaseInOut" dynamic="True" >0 1.99085e-05 0 0 2.00005 1.99085e-05 0 0 3.104 -223.962 0 0 4.708 -223.962 0 0 6.96605 1.99085e-05 0 0 9.01 1.99085e-05 0 0 14.254 224.095 0 0 16.466 224.095 <AnimationTrack property="position.x" type="EaseInOut" dynamic="True" >0 1.99085e-05 0 0 2.00005 1.99085e-05 0 0 3.104 -223.962 0 0 4.708 -223.962 0 0 6.96605 1.99085e-05 0 0 9.01 1.99085e-05 0 0 14.254 224.095 0 0 16.466 224.095
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</State> </State>
</State> </State>
<State name="Master Slide" component="#Plane" > <State name="Master Slide" component="#Plane" >
<Add ref="#Plane_001" endtime="24000" importfile="models/road/road.import" position="1.326e-05 3.69591e-20 303.353" rotation="-90 -90 0" scale="216.21 337.5 337.5" sourcepath="models/road_001/meshes/Plane.mesh" > <Add ref="#Plane_001" endtime="24000" importfile="../models/road/road.import" position="1.326e-05 3.69591e-20 303.353" rotation="-90 -90 0" scale="216.21 337.5 337.5" sourcepath="../models/road/meshes/Plane.mesh" >
<AnimationTrack property="position.x" type="EaseInOut" >0.008 6.03426e-05 0 0 1.395 1.99652e-05 0 0 2.003 1.326e-05 0 0 22.0021 1.326e-05 0 0 22.7 1.99652e-05 0 0 24 6.03426e-05 0 0 44 6.03426e-05 0 0</AnimationTrack> <AnimationTrack property="position.x" type="EaseInOut" >0.008 6.03426e-05 0 0 1.395 1.99652e-05 0 0 2.003 1.326e-05 0 0 22.0021 1.326e-05 0 0 22.7 1.99652e-05 0 0 24 6.03426e-05 0 0 44 6.03426e-05 0 0</AnimationTrack>
<AnimationTrack property="position.y" type="EaseInOut" >0.008 3.47976e-19 0 0 1.395 9.58182e-20 0 0 2.003 3.69591e-20 0 0 22.0021 3.69591e-20 0 0 22.7 9.58182e-20 0 0 24 3.47976e-19 0 0 44 3.47976e-19 0 0</AnimationTrack> <AnimationTrack property="position.y" type="EaseInOut" >0.008 3.47976e-19 0 0 1.395 9.58182e-20 0 0 2.003 3.69591e-20 0 0 22.0021 3.69591e-20 0 0 22.7 9.58182e-20 0 0 24 3.47976e-19 0 0 44 3.47976e-19 0 0</AnimationTrack>
<AnimationTrack property="position.z" type="EaseInOut" >0.008 1380.48 0 0 1.395 456.749 0 0 2.003 303.353 0 0 22.0021 303.353 0 0 22.7 456.749 0 0 24 1380.48 0 0 44 1380.48 0 0</AnimationTrack> <AnimationTrack property="position.z" type="EaseInOut" >0.008 1380.48 0 0 1.395 456.749 0 0 2.003 303.353 0 0 22.0021 303.353 0 0 22.7 456.749 0 0 24 1380.48 0 0 44 1380.48 0 0</AnimationTrack>
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
<AnimationTrack property="scale.z" type="EaseInOut" >0.008 486.725 0 0 0.7 418.891 0 0 1.395 377.373 0 0 2.003 337.5 0 0 22.0021 337.5 0 0 22.7 377.373 0 0 23.366 418.891 0 0 24 486.725 <AnimationTrack property="scale.z" type="EaseInOut" >0.008 486.725 0 0 0.7 418.891 0 0 1.395 377.373 0 0 2.003 337.5 0 0 22.0021 337.5 0 0 22.7 377.373 0 0 23.366 418.891 0 0 24 486.725
0 0 44 486.725 0 0</AnimationTrack> 0 0 44 486.725 0 0</AnimationTrack>
</Add> </Add>
<Add ref="#Plane_Diffuse_Default" name="Plane_Diffuse_Default" blendmode="Normal" bumpamount="0.5" diffuse="0.8 0.8 0.8" diffuselightwrap="0" diffusemap="#Plane_Diffuse_Default_diffusemap" displaceamount="20" emissivecolor="1 1 1" emissivepower="0" fresnelPower="0" importfile="models/road/road.import" importid="Plane_Diffuse_Default" ior="1.5" opacity="100" shaderlighting="None" sourcepath="" specularamount="0" specularmodel="Default" specularroughness="0" speculartint="1 1 1" translucentfalloff="1" type="Material" vertexcolors="True" /> <Add ref="#Plane_Diffuse_Default" name="Plane_Diffuse_Default" blendmode="Normal" bumpamount="0.5" diffuse="0.8 0.8 0.8" diffuselightwrap="0" diffusemap="#Plane_Diffuse_Default_diffusemap" displaceamount="20" emissivecolor="1 1 1" emissivepower="0" fresnelPower="0" importfile="../models/road/road.import" importid="Plane_Diffuse_Default" ior="1.5" opacity="100" shaderlighting="None" sourcepath="" specularamount="0" specularmodel="Default" specularroughness="0" speculartint="1 1 1" translucentfalloff="1" type="Material" vertexcolors="True" />
<Add ref="#Plane_Diffuse_Default_diffusemap" controlledproperty="$roadSpeed positionv" importid="" positionu="0" scaleu="1" scalev="5" sourcepath="maps/road.jpg" subpresentation="" tilingmodehorz="Tiled" tilingmodevert="Tiled" /> <Add ref="#Plane_Diffuse_Default_diffusemap" controlledproperty="$roadSpeed positionv" importid="" positionu="0" scaleu="1" scalev="5" sourcepath="../maps/road.jpg" subpresentation="" tilingmodehorz="Tiled" tilingmodevert="Tiled" />
<State id="Plane-Slide1" name="Slide1" playmode="Looping" > <State id="Plane-Slide1" name="Slide1" playmode="Looping" >
<Set ref="#Plane_001" endtime="44000" /> <Set ref="#Plane_001" endtime="44000" />
</State> </State>
......
#include <QGuiApplication> #include <QGuiApplication>
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QtGui/QSurfaceFormat>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// qputenv("Q3DS_NO_DRAGONWINGS", "1"); #if 0 // For B2Qt and QNX
// qputenv("Q3DS_DRAGON", "1");
qputenv("QT_QPA_EGLFS_HIDECURSOR", "1"); qputenv("QT_QPA_EGLFS_HIDECURSOR", "1");
qputenv("QT_QPA_EGLFS_DISABLE_INPUT", "1"); qputenv("QT_QPA_EGLFS_DISABLE_INPUT", "1");
qputenv("QT_QPA_EGLFS_WIDTH", "1280"); qputenv("QT_QPA_EGLFS_WIDTH", "1280");
qputenv("QT_QPA_EGLFS_HEIGHT", "480"); qputenv("QT_QPA_EGLFS_HEIGHT", "480");
qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", "293"); qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", "293");
qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", "110"); qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", "110");
// qputenv("QSG_RENDER_LOOP", "basic");
qputenv("QSG_RENDER_LOOP", "threaded"); qputenv("QSG_RENDER_LOOP", "threaded");
// Debugging // Debugging
...@@ -23,9 +22,20 @@ int main(int argc, char *argv[]) ...@@ -23,9 +22,20 @@ int main(int argc, char *argv[])
qputenv("QT_LOGGING_RULES", "*=false"); qputenv("QT_LOGGING_RULES", "*=false");
// QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QGuiApplication app(argc, argv); QGuiApplication app(argc, 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
QQmlApplicationEngine engine; QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty()) if (engine.rootObjects().isEmpty())
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
<file>Presentation/models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.psd</file> <file>Presentation/models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.psd</file>
<file>Presentation/models/lowPolyCar/meshes/polySurface3.mesh</file> <file>Presentation/models/lowPolyCar/meshes/polySurface3.mesh</file>
<file>Presentation/models/lowPolyCar/lowPolyCar.import</file> <file>Presentation/models/lowPolyCar/lowPolyCar.import</file>
<file>Presentation/models/road_001/meshes/Plane.mesh</file>
<file>Presentation/models/road_001/road.import</file>
<file>Presentation/Presentation.uia</file> <file>Presentation/Presentation.uia</file>
<file>main.cpp</file> <file>main.cpp</file>
<file>TitilliumWeb-Italic.ttf</file> <file>TitilliumWeb-Italic.ttf</file>
...@@ -32,5 +30,7 @@ ...@@ -32,5 +30,7 @@
<file>SimulationData.qml</file> <file>SimulationData.qml</file>
<file>Presentation/materials/lowpolyCoupeRed.materialdef</file> <file>Presentation/materials/lowpolyCoupeRed.materialdef</file>
<file>Presentation/presentations/Presentation.uip</file> <file>Presentation/presentations/Presentation.uip</file>
<file>Presentation/models/road/meshes/Plane.mesh</file>
<file>Presentation/models/road/road.import</file>
</qresource> </qresource>
</RCC> </RCC>
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