Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsgtexture_mac.mm
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qsgtexture_p.h"
6#include <private/qquickitem_p.h>
7#include <private/qquickwindow_p.h>
8#include <QtCore/private/qnativeinterface_p.h>
9#include <rhi/qrhi.h>
10
12
13id<MTLTexture> QSGTexturePlatformMetal::nativeTexture() const
14{
15 if (auto *tex = m_texture->rhiTexture())
16 return (id<MTLTexture>) quintptr(tex->nativeTexture().object);
17 return 0;
18}
19
20namespace QNativeInterface {
21
23
24QSGTexture *QSGMetalTexture::fromNative(id<MTLTexture> texture,
26 const QSize &size,
27 QQuickWindow::CreateTextureOptions options)
28{
30}
31
32} // QNativeInterface
33
static QQuickWindowPrivate * get(QQuickWindow *c)
QSGTexture * createTextureFromNativeTexture(quint64 nativeObjectHandle, int nativeLayoutOrState, uint nativeFormat, const QSize &size, QQuickWindow::CreateTextureOptions options, TextureFromNativeTextureFlags flags={}) const
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtQuick
Definition qsgtexture.h:20
\inmodule QtCore
Definition qsize.h:25
Combined button and popup list for selecting options.
#define QT_DEFINE_NATIVE_INTERFACE(...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint id
[7]
GLenum GLuint texture
size_t quintptr
Definition qtypes.h:72
unsigned long long quint64
Definition qtypes.h:56
aWidget window() -> setWindowTitle("New Window Title")
[2]