Skip to content

Commit 9a3d380

Browse files
authored
200.2 release
1 parent b5fcac7 commit 9a3d380

File tree

23 files changed

+92
-85
lines changed

23 files changed

+92
-85
lines changed

augmentedreality/Common/include/Android/ArCoreWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class ArCorePlaneRenderer;
4444

4545
class ArCoreWrapper
4646
{
47+
4748
public:
4849
ArCoreWrapper(ArcGISArViewInterface* arcGISArView);
4950
~ArCoreWrapper();

augmentedreality/Common/source/Android/ArCoreWrapper.cpp

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
// Qt headers
2727
#include <QCoreApplication>
2828
#include <QGuiApplication>
29+
#include <QPermission>
2930
#include <QScreen>
3031

3132
// C++ headers
3233
#include <array>
3334

34-
#include <QtCore/private/qandroidextras_p.h>
35-
3635
using namespace Esri::ArcGISRuntime;
3736
using namespace Esri::ArcGISRuntime::Toolkit::Internal;
3837

@@ -285,20 +284,28 @@ void ArCoreWrapper::createArSession()
285284
if (m_arSession)
286285
return;
287286

288-
// request camera permission
289-
auto checkPermissionResultFuture = QtAndroidPrivate::checkPermission(QtAndroidPrivate::PermissionType::Camera);
290-
checkPermissionResultFuture.waitForFinished();
291-
const auto checkPermissionResult = checkPermissionResultFuture.result();
292-
if (checkPermissionResult != QtAndroidPrivate::PermissionResult::Authorized)
287+
QCameraPermission cameraPermission;
288+
QEventLoop loop;
289+
290+
if (qApp->checkPermission(cameraPermission) == Qt::PermissionStatus::Undetermined)
293291
{
294-
auto requestPermissionResultFuture = QtAndroidPrivate::requestPermission(QtAndroidPrivate::PermissionType::Camera);
295-
requestPermissionResultFuture.waitForFinished();
296-
const auto requestPermissionResult = requestPermissionResultFuture.result();
297-
if (requestPermissionResult != QtAndroidPrivate::PermissionResult::Authorized)
298-
{
292+
qApp->requestPermission(cameraPermission, &loop, [&loop]() {
293+
//Connect finishing requestPermission to quitting the blocking loop
294+
loop.quit();
295+
});
296+
//Start the blocking loop to wait for permissions
297+
loop.exec();
298+
}
299+
300+
//checkPermission will never return Undetermined after call to requestPermission
301+
switch (qApp->checkPermission(cameraPermission))
302+
{
303+
case Qt::PermissionStatus::Granted:
304+
break;
305+
case Qt::PermissionStatus::Denied:
306+
default:
299307
emit m_arcGISArView->errorOccurred("ARCore failure", "Failed to access to the camera.");
300308
return;
301-
}
302309
}
303310

304311
// try to create the ARCore session. This function can fail if the user reject the authorization

augmentedreality/Examples/CppArExample/CppArExample.pro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ CONFIG += c++17
2323
TARGET = CppArExample
2424

2525
lessThan(QT_MAJOR_VERSION, 6) {
26-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
26+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
2727
}
2828

2929
equals(QT_MAJOR_VERSION, 6) {
30-
lessThan(QT_MINOR_VERSION, 2) {
31-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
30+
lessThan(QT_MINOR_VERSION, 5) {
31+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3232
}
33-
equals(QT_MINOR_VERSION, 2) : lessThan(QT_PATCH_VERSION, 4) {
34-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
33+
equals(QT_MINOR_VERSION, 5) : lessThan(QT_PATCH_VERSION, 1) {
34+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3535
}
3636
}
3737

38-
ARCGIS_RUNTIME_VERSION = 200.1.0
38+
ARCGIS_RUNTIME_VERSION = 200.2.0
3939
include($$PWD/arcgisruntime.pri)
4040

4141
HEADERS += \

augmentedreality/Examples/CppArExample/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <QQmlApplicationEngine>
2828
#include <QSettings>
2929
#include <QSurfaceFormat>
30+
#include <QQuickWindow>
3031

3132
#include <ArcGISRuntimeEnvironment.h>
3233
#include <SceneQuickView.h>
@@ -49,13 +50,13 @@ using namespace Esri::ArcGISRuntime;
4950

5051
int main(int argc, char *argv[])
5152
{
52-
// Enforce OpenGL
53-
qputenv("QSG_RHI_BACKEND", "opengl");
53+
// At this time AR with the ArcGIS Maps SDK for Qt only supports OpenGL
54+
QQuickWindow::setGraphicsApi(QSGRendererInterface::GraphicsApi::OpenGL);
5455

5556
// There are some conflicts between the AR frameworks and the Qt's rendering thread.
5657
// This code enables the non-threaded render loop mode in Qt.
5758
// See SceneView::renderFrame documentation and Qt's documentation
58-
// https://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html#non-threaded-render-loops-basic-and-windows
59+
// https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph.html#non-threaded-render-loops-basic-and-windows
5960
// for more information.
6061
#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID)
6162
qputenv("QSG_RENDER_LOOP", "basic");

augmentedreality/Examples/QmlArExample/QmlArExample.pro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ CONFIG += c++17
2525
QT += core gui opengl network positioning sensors qml quick
2626

2727
lessThan(QT_MAJOR_VERSION, 6) {
28-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
28+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
2929
}
3030

3131
equals(QT_MAJOR_VERSION, 6) {
32-
lessThan(QT_MINOR_VERSION, 2) {
33-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
32+
lessThan(QT_MINOR_VERSION, 5) {
33+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3434
}
35-
equals(QT_MINOR_VERSION, 2) : lessThan(QT_PATCH_VERSION, 4) {
36-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
35+
equals(QT_MINOR_VERSION, 5) : lessThan(QT_PATCH_VERSION, 1) {
36+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3737
}
3838
}
3939

40-
ARCGIS_RUNTIME_VERSION = 200.1.0
40+
ARCGIS_RUNTIME_VERSION = 200.2.0
4141
include($$PWD/arcgisruntime.pri)
4242

4343
TEMPLATE = app

augmentedreality/Examples/QmlArExample/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <QCommandLineParser>
2323
#include <QDir>
2424
#include <QSurfaceFormat>
25+
#include <QQuickWindow>
2526

2627
#ifdef Q_OS_WIN
2728
#include <Windows.h>
@@ -54,13 +55,13 @@
5455

5556
int main(int argc, char *argv[])
5657
{
57-
// Enforce OpenGL
58-
qputenv("QSG_RHI_BACKEND", "opengl");
58+
// At this time AR with the ArcGIS Maps SDK for Qt only supports OpenGL
59+
QQuickWindow::setGraphicsApi(QSGRendererInterface::GraphicsApi::OpenGL);
5960

6061
// There are some conflicts between the AR frameworks and the Qt's rendering thread.
6162
// This code enables the non-threaded render loop mode in Qt.
6263
// See SceneView::renderFrame documentation and Qt's documentation
63-
// https://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html#non-threaded-render-loops-basic-and-windows
64+
// https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph.html#non-threaded-render-loops-basic-and-windows
6465
// for more information.
6566
#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID)
6667
qputenv("QSG_RENDER_LOOP", "basic");

augmentedreality/Examples/QmlArExample/qml/scenes/TabletopTestSceneGraphic.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Graphic {
3535

3636
symbol: SimpleMarkerSceneSymbol {
3737
id: symbol
38-
style: "SimpleMarkerSceneSymbolStyleSphere"
38+
style: Enums.SimpleMarkerSceneSymbolStyleSphere
3939
anchorPosition: Enums.SceneSymbolAnchorPositionCenter
4040
color: "green"
4141
width: size

augmentedreality/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ Android 7.0 64-bit (armv8) is the minimum requirement. 32-bit (armv7) is not sup
6262

6363
The latest ArcGIS Maps SDK for Qt is required to use this toolkit component.
6464

65+
The system requirements for the ArcGIS Maps SDK for Qt take precedence over the minimum versions mentioned here.
66+
67+
OpenGL graphics API is required. Metal is not supported. See the [limitations](#Limitations) section below for more details.
68+
6569
## Creating a new AR app using ArcGIS Maps AR toolkit
6670

6771
### Creating a new C++ app
@@ -80,7 +84,7 @@ for details.
8084
[ArcGIS Maps SDK for Qt Toolkit](https://github.com/Esri/arcgis-maps-sdk-toolkit-qt).
8185

8286
3. In Qt Creator, create a new project and select the app template named
83-
"ArcGIS Maps 200.1.0 Qt Quick C++ app". Select the option "3D project" in the
87+
"ArcGIS Maps 200.2.0 Qt Quick C++ app". Select the option "3D project" in the
8488
"Details" dialog.
8589

8690
4. In the newly created project, add the following lines anywhere in the app's project (`.pro`)
@@ -227,7 +231,7 @@ for details.
227231

228232
2. Download the sources of the [ArcGIS Maps SDK for Qt Toolkit](https://github.com/Esri/arcgis-maps-sdk-toolkit-qt) from GitHub.
229233

230-
3. In Qt Creator, create a new project and select "ArcGIS Maps 200.1.0 Qt Quick QML app".
234+
3. In Qt Creator, create a new project and select "ArcGIS Maps 200.2.0 Qt Quick QML app".
231235
Select the option "3D project" in the "Details" step.
232236

233237
4. In the created project, add the following lines anywhere in the app's project
@@ -411,3 +415,12 @@ The following lines of code enable the non-threaded render loop mode in Qt:
411415
qputenv("QSG_RENDER_LOOP", "basic");
412416
#endif
413417
```
418+
419+
## Limitations
420+
421+
AR currently only supports OpenGL. On iOS devices, you must enforce this because the default graphics API on
422+
iOS devices is Metal. Add the following code to your apps:
423+
424+
```cpp
425+
QQuickWindow::setGraphicsApi(QSGRendererInterface::GraphicsApi::OpenGL);
426+
```

calcite-qml/demo/calcite_test.pro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ CONFIG += c++17
2323
# additional modules are pulled in via arcgisruntime.pri
2424
QT += opengl qml quick quickcontrols2
2525

26-
ARCGIS_RUNTIME_VERSION = 200.1.0
26+
ARCGIS_RUNTIME_VERSION = 200.2.0
2727
include($$PWD/arcgisruntime.pri)
2828

2929
TEMPLATE = app
3030
TARGET = calcite_test
3131

3232
lessThan(QT_MAJOR_VERSION, 6) {
33-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
33+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3434
}
3535

3636
equals(QT_MAJOR_VERSION, 6) {
37-
lessThan(QT_MINOR_VERSION, 2) {
38-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
37+
lessThan(QT_MINOR_VERSION, 5) {
38+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
3939
}
40-
equals(QT_MINOR_VERSION, 2) : lessThan(QT_PATCH_VERSION, 4) {
41-
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.2.4")
40+
equals(QT_MINOR_VERSION, 5) : lessThan(QT_PATCH_VERSION, 1) {
41+
error("This version of the ArcGIS Maps SDK for Qt requires at least Qt 6.5.1")
4242
}
4343
}
4444

tests/uitools/cpp_quick/unit_tests/BasemapGalleryItemUnitTest/BasemapGalleryItemUnitTest.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ QT += testlib
2727
QT -= gui
2828
QT += core gui opengl xml testlib network positioning sensors multimedia quick
2929

30-
ARCGIS_RUNTIME_VERSION = 200.1.0
30+
ARCGIS_RUNTIME_VERSION = 200.2.0
3131

3232
include($$PWD/../arcgisruntime.pri)
3333
include($$PWD/../../../../../uitools/toolkitcpp.pri)

0 commit comments

Comments
 (0)