Skip to content
Snippets Groups Projects
Commit 96560272 authored by Norihito Tohge's avatar Norihito Tohge
Browse files

Doc: Add documentation of Texture.format property


Task-number: QTBUG-82805
Change-Id: I8610f20ddaffd0f6fdffaffafa747552a9051a2f
Reviewed-by: default avatarTomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: default avatarAndy Nichols <andy.nichols@qt.io>
parent 501bb606
No related branches found
No related tags found
No related merge requests found
...@@ -251,6 +251,53 @@ bool QQuick3DTexture::flipV() const ...@@ -251,6 +251,53 @@ bool QQuick3DTexture::flipV() const
return m_flipV; return m_flipV;
} }
/*!
\qmlproperty enumeration QtQuick3D::Texture::format
This property controls the color format of the texture assigned in \l source property.
By default, it is automatically determined.
However, it can be manually set if the automatic format is not what is wanted.
\value Texture.Automatic The color format will be automatically determined (default).
\value Texture.R8 The color format is considered as 8-bit integer in R channel.
\value Texture.R16 The color format is considered as 16-bit integer in R channel.
\value Texture.R16F The color format is considered as 16-bit float in R channel.
\value Texture.R32I The color format is considered as 32-bit integer in R channel.
\value Texture.R32UI The color format is considered as 32-bit unsigned integer in R channel.
\value Texture.R32F The color format is considered as 32-bit float R channel.
\value Texture.RG8 The color format is considered as 8-bit integer in R and G channels.
\value Texture.RGBA8 The color format is considered as 8-bit integer in R, G, B and alpha channels.
\value Texture.RGB8 The color format is considered as 8-bit integer in R, G and B channels.
\value Texture.SRGB8 The color format is considered as 8-bit integer in R, G and B channels in standard RGB color space.
\value Texture.SRGB8A8 The color format is considered as 8-bit integer in R, G, B and alpha channels in standard RGB color space.
\value Texture.RGB565 The color format is considered as 5-bit integer in R and B channels and 6-bit integer in G channel.
\value Texture.RGBA5551 The color format is considered as 5-bit integer in R, G, B channels and boolean alpha channel.
\value Texture.Alpha8 The color format is considered as 8-bit alpha map.
\value Texture.Luminance8 The color format is considered as 8-bit luminance map.
\value Texture.Luminance16 The color format is considered as 16-bit luminance map.
\value Texture.LuminanceAlpha8 The color format is considered as 8-bit luminance and alpha map.
\value Texture.RGBA16F The color format is considered as 16-bit float in R,G,B and alpha channels.
\value Texture.RG16F The color format is considered as 16-bit float in R and G channels.
\value Texture.RG32F The color format is considered as 32-bit float in R and G channels.
\value Texture.RGB32F The color format is considered as 32-bit float in R, G and B channels.
\value Texture.RGBA32F The color format is considered as 32-bit float in R, G, B and alpha channels.
\value Texture.R11G11B10 The color format is considered as 11-bit integer in R and G channels and 10-bit integer in B channel.
\value Texture.RGB9E5 The color format is considered as 9-bit mantissa in R, G and channels and 5-bit shared exponent.
\value Texture.RGBA_DXT1 The color format is considered as DXT1 compressed format with R, G, B and alpha channels.
\value Texture.RGB_DXT1 The color format is considered as DXT1 compressed format with R, G and B channels.
\value Texture.RGBA_DXT3 The color format is considered as DXT3 compressed format with R, G, B and alpha channels.
\value Texture.RGBA_DXT5 The color format is considered as DXT5 compressed format with R, G, B and alpha channels.
\value Texture.Depth16 The color format is considered as 16-bit depth map.
\value Texture.Depth24 The color format is considered as 24-bit depth map.
\value Texture.Depth32 The color format is considered as 32-bit depth map.
\value Texture.Depth24Stencil8 The color format is considered as 24-bit depth and 8-bit stencil map.
*/
QQuick3DTexture::Format QQuick3DTexture::format() const
{
return m_format;
}
void QQuick3DTexture::setSource(const QUrl &source) void QQuick3DTexture::setSource(const QUrl &source)
{ {
if (m_source == source) if (m_source == source)
...@@ -641,11 +688,6 @@ QSSGRenderImage *QQuick3DTexture::getRenderImage() ...@@ -641,11 +688,6 @@ QSSGRenderImage *QQuick3DTexture::getRenderImage()
return static_cast<QSSGRenderImage *>(p->spatialNode); return static_cast<QSSGRenderImage *>(p->spatialNode);
} }
QQuick3DTexture::Format QQuick3DTexture::format() const
{
return m_format;
}
void QQuick3DTexture::markAllDirty() void QQuick3DTexture::markAllDirty()
{ {
m_dirtyFlags = DirtyFlags(DirtyFlag::TransformDirty) | DirtyFlags(DirtyFlag::SourceDirty); m_dirtyFlags = DirtyFlags(DirtyFlag::TransformDirty) | DirtyFlags(DirtyFlag::SourceDirty);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment