7#include <QtQuick/private/qquickwindow_p.h>
8#include <QtQuick/private/qquickitem_p.h>
17 m_textureData(texData)
215 switch (glTextureFormat) {
345 QRhiTexture::Flags texFlags;
350 qCDebug(QSG_LOG_TEXTUREIO,
"Compressed texture format possibly unsupported: 0x%x",
362 qWarning(
"Failed to create QRhiTexture for compressed data with format 0x%x",
387 switch (glTextureFormat) {
411 : m_textureData(texData)
441#include "moc_qsgcompressedtexture_p.cpp"
QByteArray toByteArray() const
constexpr qsizetype size() const noexcept
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QQuickWindowPrivate * get(QQuickWindow *c)
QSGRenderContext * context
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
void uploadTexture(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
Enqueues uploading the image data for one or more mip levels in one or more layers of the texture tex...
virtual bool create()=0
Creates the corresponding native graphics resources.
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags={}) const
Implementation backend() const
QRhiTexture * newTexture(QRhiTexture::Format format, const QSize &pixelSize, int sampleCount=1, QRhiTexture::Flags flags={})
QTextureFileData m_textureData
QSGCompressedTextureFactory(const QTextureFileData &texData)
int textureByteCount() const override
Returns the number of bytes of memory the texture consumes.
QSize textureSize() const override
Returns the size of the texture.
QSGTexture * createTexture(QQuickWindow *) const override
This function is called on the scene graph rendering thread to create a QSGTexture instance from the ...
QSGCompressedTexture(const QTextureFileData &texData)
virtual ~QSGCompressedTexture()
void commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch *resourceUpdates) override
Call this function to enqueue image upload operations to resourceUpdates, in case there are any pendi...
QRhiTexture * rhiTexture() const override
static FormatInfo formatInfo(quint32 glTextureFormat)
QTextureFileData m_textureData
static bool formatIsOpaque(quint32 glTextureFormat)
QTextureFileData textureData() const
bool hasAlphaChannel() const override
Returns true if the texture data contains an alpha channel.
bool hasMipmaps() const override
Returns true if the texture data contains mipmap levels.
qint64 comparisonKey() const override
Returns a key suitable for comparing textures.
QSize textureSize() const override
Returns the size of the texture in pixels.
quint32 glInternalFormat() const
QByteArray logName() const
QByteArrayView getDataView(int level=0, int face=0) const
@ SRGB8_Alpha8_ASTC_12x12
@ SRGB8_Alpha8_ASTC_10x10
@ SRGB8_PunchThrough_Alpha1_ETC2
@ RGB8_PunchThrough_Alpha1_ETC2
@ SRGB8_Alpha8_ASTC_12x10
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
QVideoFrameFormat::PixelFormat fmt