File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 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
5051int 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" );
Original file line number Diff line number Diff line change 2222#include < QCommandLineParser>
2323#include < QDir>
2424#include < QSurfaceFormat>
25+ #include < QQuickWindow>
2526
2627#ifdef Q_OS_WIN
2728#include < Windows.h>
5455
5556int 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" );
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ Android 7.0 64-bit (armv8) is the minimum requirement. 32-bit (armv7) is not sup
6262
6363The 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
@@ -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+ ```
Original file line number Diff line number Diff line change 3535// ------------------------------------------------------------------------------
3636int main (int argc, char * argv[])
3737{
38- // Enforce OpenGL
39- qputenv (" QSG_RHI_BACKEND" , " opengl" );
4038
4139 QtWebView::initialize ();
4240 QGuiApplication app (argc, argv);
Original file line number Diff line number Diff line change 2727
2828int main (int argc, char * argv[])
2929{
30- // Enforce OpenGL
31- qputenv (" QSG_RHI_BACKEND" , " opengl" );
3230
3331 QtWebView::initialize ();
3432 QGuiApplication app (argc, argv);
You can’t perform that action at this time.
0 commit comments