diff options
Diffstat (limited to 'examples')
4 files changed, 11 insertions, 6 deletions
diff --git a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.pro b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.pro index 5b11606946..bbdfd358d3 100644 --- a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.pro +++ b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.pro @@ -1,4 +1,4 @@ -!macos: error("This example requires macOS") +!macos:!ios: error("This example requires macOS or iOS") QT += qml quick @@ -6,7 +6,8 @@ HEADERS += metaltextureimport.h SOURCES += metaltextureimport.mm main.cpp RESOURCES += metaltextureimport.qrc -LIBS += -framework Metal -framework AppKit +LIBS += -framework Metal +macos: LIBS += -framework AppKit target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/metaltextureimport INSTALLS += target diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm index 5ca6daa01a..4844df0c70 100644 --- a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm +++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm @@ -349,10 +349,13 @@ void SquircleRenderer::init(int framesInFlight) rpDesc.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOne; rpDesc.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOne; +#ifdef Q_OS_MACOS if (m_device.depth24Stencil8PixelFormatSupported) { rpDesc.depthAttachmentPixelFormat = MTLPixelFormatDepth24Unorm_Stencil8; rpDesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth24Unorm_Stencil8; - } else { + } else +#endif + { rpDesc.depthAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8; rpDesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8; } diff --git a/examples/quick/scenegraph/metalunderqml/metalunderqml.pro b/examples/quick/scenegraph/metalunderqml/metalunderqml.pro index 9fd131fe1b..2f4c3f63da 100644 --- a/examples/quick/scenegraph/metalunderqml/metalunderqml.pro +++ b/examples/quick/scenegraph/metalunderqml/metalunderqml.pro @@ -1,4 +1,4 @@ -!macos: error("This example requires macOS") +!macos:!ios: error("This example requires macOS or iOS") QT += qml quick @@ -6,7 +6,8 @@ HEADERS += metalsquircle.h SOURCES += metalsquircle.mm main.cpp RESOURCES += metalunderqml.qrc -LIBS += -framework Metal -framework AppKit +LIBS += -framework Metal +macos: LIBS += -framework AppKit target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/metalunderqml INSTALLS += target diff --git a/examples/quick/scenegraph/scenegraph.pro b/examples/quick/scenegraph/scenegraph.pro index 5fea3b974a..cc75cbc0d3 100644 --- a/examples/quick/scenegraph/scenegraph.pro +++ b/examples/quick/scenegraph/scenegraph.pro @@ -16,7 +16,7 @@ SUBDIRS += \ rendernode \ threadedanimation -macos { +macos|ios { SUBDIRS += \ metalunderqml \ metaltextureimport |