16#include <QtGui/qtguiglobal.h>
17#include <QtCore/qsize.h>
18#include <QtCore/qlist.h>
19#include <QtCore/qvarlengtharray.h>
20#include <QtCore/qthread.h>
21#include <QtGui/qmatrix4x4.h>
22#include <QtGui/qcolor.h>
23#include <QtGui/qimage.h>
61 return a.m_d ==
b.m_d &&
a.m_s ==
b.m_s;
80#ifndef QT_NO_DEBUG_STREAM
88 QRhiViewport(
float x,
float y,
float w,
float h,
float minDepth = 0.0f,
float maxDepth = 1.0f);
90 std::array<float, 4>
viewport()
const {
return m_rect; }
92 m_rect[0] =
x; m_rect[1] =
y; m_rect[2] =
w; m_rect[3] =
h;
102 std::array<float, 4> m_rect { { 0.0f, 0.0f, 0.0f, 0.0f } };
103 float m_minDepth = 0.0f;
104 float m_maxDepth = 1.0f;
108 return a.m_rect ==
b.m_rect
109 &&
a.m_minDepth ==
b.m_minDepth
110 &&
a.m_maxDepth ==
b.m_maxDepth;
133#ifndef QT_NO_DEBUG_STREAM
143 std::array<int, 4>
scissor()
const {
return m_rect; }
145 m_rect[0] =
x; m_rect[1] =
y; m_rect[2] =
w; m_rect[3] =
h;
149 std::array<int, 4> m_rect { { 0, 0, 0, 0 } };
153 return a.m_rect ==
b.m_rect;
174#ifndef QT_NO_DEBUG_STREAM
200 Classification m_classification = PerVertex;
201 quint32 m_instanceStepRate = 1;
205 return a.m_stride ==
b.m_stride
206 &&
a.m_classification ==
b.m_classification
207 &&
a.m_instanceStepRate ==
b.m_instanceStepRate;
227#ifndef QT_NO_DEBUG_STREAM
279 int m_matrixSlice = -1;
283 return a.m_binding ==
b.m_binding
284 &&
a.m_location ==
b.m_location
285 &&
a.m_format ==
b.m_format
286 &&
a.m_offset ==
b.m_offset;
308#ifndef QT_NO_DEBUG_STREAM
318 template<
typename InputIterator>
322 std::copy(
first, last, std::back_inserter(m_bindings));
330 template<
typename InputIterator>
333 m_attributes.clear();
334 std::copy(
first, last, std::back_inserter(m_attributes));
347 return a.m_bindings ==
b.m_bindings &&
a.m_attributes ==
b.m_attributes;
366#ifndef QT_NO_DEBUG_STREAM
402 return a.m_type ==
b.m_type
403 &&
a.m_shader ==
b.m_shader
404 &&
a.m_shaderVariant ==
b.m_shaderVariant;
424#ifndef QT_NO_DEBUG_STREAM
447 VertexStage = 1 << 0,
448 TessellationControlStage = 1 << 1,
449 TessellationEvaluationStage = 1 << 2,
450 GeometryStage = 1 << 3,
451 FragmentStage = 1 << 4,
452 ComputeStage = 1 << 5
490 QRhiShaderResourceBinding::StageFlags
stage;
498 static const int MAX_TEX_SAMPLER_ARRAY_SIZE = 16;
526 template<
typename Output>
538 static const int LAYOUT_DESC_ENTRIES_PER_BINDING = 4;
540 template<
typename Output>
545 while (
first != last) {
563#ifndef QT_NO_DEBUG_STREAM
580 int layer()
const {
return m_layer; }
583 int level()
const {
return m_level; }
604 int m_resolveLayer = 0;
605 int m_resolveLevel = 0;
606 int m_multiViewCount = 0;
620 template<
typename InputIterator>
623 m_colorAttachments.clear();
624 std::copy(
first, last, std::back_inserter(m_colorAttachments));
673 QPoint m_destinationTopLeft;
686 int layer()
const {
return m_layer; }
689 int level()
const {
return m_level; }
711 template<
typename InputIterator>
715 std::copy(
first, last, std::back_inserter(m_entries));
754 int m_sourceLayer = 0;
755 int m_sourceLevel = 0;
757 int m_destinationLayer = 0;
758 int m_destinationLevel = 0;
759 QPoint m_destinationTopLeft;
773 int layer()
const {
return m_layer; }
776 int level()
const {
return m_level; }
820 quint64 globalResourceId()
const;
843 VertexBuffer = 1 << 0,
844 IndexBuffer = 1 << 1,
845 UniformBuffer = 1 << 2,
846 StorageBuffer = 1 << 3
851 const void *objects[3];
860 UsageFlags
usage()
const {
return m_usage; }
870 virtual char *beginFullDynamicBufferUpdateForCurrentFrame();
871 virtual void endFullDynamicBufferUpdateForCurrentFrame();
886 RenderTarget = 1 << 0,
890 UsedAsTransferSource = 1 << 5,
891 UsedWithGenerateMips = 1 << 6,
892 UsedWithLoadStore = 1 << 7,
893 UsedAsCompressedAtlas = 1 << 8,
894 ExternalOES = 1 << 9,
895 ThreeDimensional = 1 << 10,
896 TextureRectangleGL = 1 << 11,
897 TextureArray = 1 << 12,
898 OneDimensional = 1 << 13
966 int depth()
const {
return m_depth; }
976 m_arrayRangeStart = startIndex;
977 m_arrayRangeLength =
count;
989 virtual void setNativeLayout(
int layout);
993 int arraySize_,
int sampleCount_,
Flags flags_);
1000 int m_arrayRangeStart = -1;
1001 int m_arrayRangeLength = -1;
1079 UsedWithSwapChainOnly = 1 << 0
1164 PreserveColorContents = 1 << 0,
1165 PreserveDepthStencilContents = 1 << 1
1195 template<
typename InputIterator>
1199 std::copy(
first, last, std::back_inserter(m_bindings));
1213 BindingsAreSorted = 0x01
1217 virtual
void updateResources(UpdateFlags
flags = {}) = 0;
1220 static const int BINDING_PREALLOC = 12;
1223 size_t m_layoutDescHash = 0;
1229#ifndef QT_NO_DEBUG_STREAM
1236#ifndef QT_NO_DEBUG_STREAM
1244 UsesBlendConstants = 1 << 0,
1245 UsesStencilRef = 1 << 1,
1246 UsesScissor = 1 << 2,
1247 CompileShadersWithDebugInfo = 1 << 3
1311 ColorMask colorWrite = ColorMask(0xF);
1370 template<
typename InputIterator>
1373 m_targetBlends.clear();
1374 std::copy(
first, last, std::back_inserter(m_targetBlends));
1418 template<
typename InputIterator>
1421 m_shaderStages.clear();
1422 std::copy(
first, last, std::back_inserter(m_shaderStages));
1456 bool m_depthTest =
false;
1457 bool m_depthWrite =
false;
1459 bool m_stencilTest =
false;
1464 int m_sampleCount = 1;
1465 float m_lineWidth = 1.0f;
1466 int m_depthBias = 0;
1467 float m_slopeScaledDepthBias = 0.0f;
1468 int m_patchControlPointCount = 3;
1470 int m_multiViewCount = 0;
1497 } colorComponentValue;
1503#ifndef QT_NO_DEBUG_STREAM
1509 void *reserved[2] = {};
1516 SurfaceHasPreMulAlpha = 1 << 0,
1517 SurfaceHasNonPreMulAlpha = 1 << 1,
1519 UsedAsTransferSource = 1 << 3,
1521 MinimalBufferCount = 1 << 5
1576 int m_sampleCount = 1;
1588 CompileShadersWithDebugInfo = 1 << 0
1622 ExternalContent = 0x01,
1623 DoNotTrackResourcesForCompute = 0x02
1632 const QColor &colorClearValue,
1635 BeginPassFlags
flags = {});
1641 int dynamicOffsetCount = 0,
1644 void setVertexInput(
int startBinding,
int bindingCount,
const VertexInput *bindings,
1650 void setBlendConstants(
const QColor &
c);
1651 void setStencilRef(
quint32 refValue);
1658 void drawIndexed(
quint32 indexCount,
1665 void debugMarkEnd();
1671 void dispatch(
int x,
int y,
int z);
1674 void beginExternal();
1677 double lastCompletedGpuTime();
1687 std::function<
void()> completed =
nullptr;
1701 bool hasOptimalCapacity()
const;
1740#ifndef QT_NO_DEBUG_STREAM
1758#ifndef QT_NO_DEBUG_STREAM
1779 EnableDebugMarkers = 1 << 0,
1780 PreferSoftwareRenderer = 1 << 1,
1781 EnablePipelineCacheDataSave = 1 << 2,
1782 EnableTimestamps = 1 << 3
1794 MultisampleTexture = 1,
1842 SkipPresent = 1 << 0
1871 Implementation backend()
const;
1873 static const char *
backendName(Implementation impl);
1886 QRhiBuffer::UsageFlags
usage,
1890 const QSize &pixelSize,
1891 int sampleCount = 1,
1892 QRhiRenderBuffer::Flags
flags = {},
1896 const QSize &pixelSize,
1897 int sampleCount = 1,
1898 QRhiTexture::Flags
flags = {});
1902 int sampleCount = 1,
1903 QRhiTexture::Flags
flags = {});
1907 const QSize &pixelSize,
1908 int sampleCount = 1,
1909 QRhiTexture::Flags
flags = {});
1919 QRhiTextureRenderTarget::Flags
flags = {});
1924 bool isRecordingFrame()
const;
1925 int currentFrameSlot()
const;
1928 FrameOpResult endOffscreenFrame(EndFrameFlags
flags = {});
1936 int ubufAlignment()
const;
1937 int ubufAligned(
int v)
const;
1939 static int mipLevelsForSize(
const QSize &
size);
1942 bool isYUpInFramebuffer()
const;
1943 bool isYUpInNDC()
const;
1944 bool isClipDepthZeroToOne()
const;
1950 int resourceLimit(ResourceLimit
limit)
const;
1953 bool makeThreadLocalNativeContextCurrent();
1955 static const int MAX_MIP_LEVELS = 16;
1957 void releaseCachedResources();
1959 bool isDeviceLost()
const;
1972 Q_DISABLE_COPY(
QRhi)
The QColor class provides colors based on RGB, HSV or CMYK values.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
\inmodule QtCore\reentrant
void setUsage(UsageFlags u)
Sets the buffer's usage flags to u.
void setType(Type t)
Sets the buffer's type to t.
Type
Specifies storage type of buffer resource.
UsageFlag
Flag values to specify how the buffer is going to be used.
void setSize(quint32 sz)
Sets the size of the buffer in bytes.
virtual bool create()=0
Creates the corresponding native graphics resources.
void setTexture(QRhiTexture *tex)
Sets the texture tex.
QRhiRenderBuffer * renderBuffer() const
int multiViewCount() const
QRhiColorAttachment()=default
Constructs an empty color attachment description.
QRhiTexture * texture() const
void setLevel(int level)
Sets the mip level.
void setRenderBuffer(QRhiRenderBuffer *rb)
Sets the renderbuffer rb.
QRhiTexture * resolveTexture() const
void setLayer(int layer)
Sets the layer index.
void setResolveLayer(int layer)
Sets the resolve texture layer to use.
void setMultiViewCount(int count)
Sets the view count.
void setResolveLevel(int level)
Sets the resolve texture mip level to use.
void setResolveTexture(QRhiTexture *tex)
Sets the resolve texture tex.
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
BeginPassFlag
Flag values for QRhi::beginPass()
QPair< int, quint32 > DynamicOffset
Synonym for QPair<int, quint32>.
IndexFormat
Specifies the index data type.
QRhiShaderStage m_shaderStage
void setShaderStage(const QRhiShaderStage &stage)
Sets the shader to use.
QRhiShaderResourceBindings * shaderResourceBindings() const
QRhiShaderStage shaderStage() const
Flag
Flag values for describing pipeline options.
void setFlags(Flags f)
Sets the flags f.
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
Associates with srb describing the resource binding layout and the resources (QRhiBuffer,...
friend bool operator!=(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b) noexcept
friend size_t qHash(const QRhiDepthStencilClearValue &v, size_t seed=0) noexcept
void setDepthClearValue(float d)
Sets the depth clear value to d.
friend bool operator==(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b) noexcept
float depthClearValue() const
quint32 stencilClearValue() const
QRhiDepthStencilClearValue()=default
Constructs a depth/stencil clear value with depth clear value 1.0f and stencil clear value 0.
void setStencilClearValue(quint32 s)
Sets the stencil clear value to s.
Flag
Flag values for describing the dynamic state of the pipeline, and other options.
BlendOp
Specifies the blend operation.
void setStencilFront(const StencilOpState &state)
Sets the stencil test state for front faces.
void setCullMode(CullMode mode)
Sets the specified face culling mode.
void setFrontFace(FrontFace f)
Sets the front face mode f.
StencilOpState stencilBack() const
PolygonMode
Specifies the polygon rasterization mode.
const QRhiShaderStage * cendShaderStages() const
void setTargetBlends(std::initializer_list< TargetBlend > list)
Sets the list of render target blend settings.
FrontFace
Specifies the front face winding order.
void setStencilTest(bool enable)
Enables or disables stencil tests based on enable.
const TargetBlend * cendTargetBlends() const
BlendFactor
Specifies the blend factor.
StencilOpState m_stencilFront
void setDepthWrite(bool enable)
Controls the writing out of depth data into the depth buffer based on enable.
bool hasDepthWrite() const
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
Associates with srb describing the resource binding layout and the resources (QRhiBuffer,...
QRhiShaderResourceBindings * shaderResourceBindings() const
void setDepthOp(CompareOp op)
Sets the depth comparison function op.
CompareOp
Specifies the depth or stencil comparison function.
int patchControlPointCount() const
void setSlopeScaledDepthBias(float bias)
Sets the slope scaled depth bias.
void setVertexInputLayout(const QRhiVertexInputLayout &layout)
Specifies the vertex input layout.
const TargetBlend * cbeginTargetBlends() const
CullMode
Specifies the culling mode.
void setStencilReadMask(quint32 mask)
Sets the stencil read mask.
QVarLengthArray< QRhiShaderStage, 4 > m_shaderStages
bool hasDepthTest() const
void setFlags(Flags f)
Sets the flags f.
void setShaderStages(std::initializer_list< QRhiShaderStage > list)
Sets the list of shader stages.
QRhiVertexInputLayout m_vertexInputLayout
bool hasStencilTest() const
QRhiRenderPassDescriptor * renderPassDescriptor() const
QVarLengthArray< TargetBlend, 8 > m_targetBlends
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
Associates with the specified QRhiRenderPassDescriptor desc.
const QRhiShaderStage * shaderStageAt(qsizetype index) const
void setSampleCount(int s)
Sets the sample count.
FrontFace frontFace() const
void setShaderStages(InputIterator first, InputIterator last)
Sets the list of shader stages from the iterators first and last.
void setTopology(Topology t)
Sets the primitive topology t.
quint32 stencilWriteMask() const
void setTargetBlends(InputIterator first, InputIterator last)
Sets the list of render target blend settings from the iterators first and last.
void setMultiViewCount(int count)
Sets the view count for multiview rendering.
QRhiVertexInputLayout vertexInputLayout() const
CullMode cullMode() const
void setPatchControlPointCount(int count)
Sets the number of patch control points to count.
Topology
Specifies the primitive topology.
CompareOp depthOp() const
StencilOpState m_stencilBack
quint32 stencilReadMask() const
const TargetBlend * targetBlendAt(qsizetype index) const
virtual bool create()=0
Creates the corresponding native graphics resources.
PolygonMode polygonMode() const
qsizetype shaderStageCount() const
void setDepthTest(bool enable)
Enables or disables depth testing based on enable.
void setDepthBias(int bias)
Sets the depth bias.
void setPolygonMode(PolygonMode mode)
Sets the polygon mode.
ColorMaskComponent
Flag values for specifying the color write mask.
StencilOp
Specifies the stencil operation.
float slopeScaledDepthBias() const
void setLineWidth(float width)
Sets the line width.
StencilOpState stencilFront() const
void setStencilWriteMask(quint32 mask)
Sets the stencil write mask.
int multiViewCount() const
Topology topology() const
const QRhiShaderStage * cbeginShaderStages() const
qsizetype targetBlendCount() const
void setStencilBack(const StencilOpState &state)
Sets the stencil test state for back faces.
QRhiReadbackDescription()=default
Constructs an empty texture readback description.
QRhiTexture * texture() const
void setLayer(int layer)
Sets the array layer to read back.
void setLevel(int level)
Sets the mip level to read back.
void setTexture(QRhiTexture *tex)
Sets the texture tex as the source of the readback operation.
void setPixelSize(const QSize &sz)
Sets the size (in pixels) to sz.
void setFlags(Flags f)
Sets the flags to f.
virtual QRhiTexture::Format backingFormat() const =0
void setType(Type t)
Sets the type to t.
QRhiTexture::Format m_backingFormatHint
void setSampleCount(int s)
Sets the sample count to s.
Type
Specifies the type of the renderbuffer.
virtual bool create()=0
Creates the corresponding native graphics resources.
Flag
\variable QRhiRenderBuffer::NativeRenderBuffer::object
virtual QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const =0
virtual bool isCompatible(const QRhiRenderPassDescriptor *other) const =0
virtual QVector< quint32 > serializedFormat() const =0
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
Sets the QRhiRenderPassDescriptor desc for use with this render target.
virtual QSize pixelSize() const =0
QRhiRenderPassDescriptor * renderPassDescriptor() const
virtual int sampleCount() const =0
virtual float devicePixelRatio() const =0
Type
Specifies type of the resource.
virtual void destroy()=0
Releases (or requests deferred releasing of) the underlying native graphics resources.
virtual Type resourceType() const =0
AddressMode addressV() const
void setMipmapMode(Filter f)
Sets the mipmap filter mode to f.
void setAddressW(AddressMode mode)
Sets the depth wrap mode.
Filter
Specifies the minification, magnification, or mipmap filtering.
AddressMode
Specifies the addressing mode.
void setMinFilter(Filter f)
Sets the minification filter mode to f.
CompareOp
Specifies the texture comparison function.
Filter mipmapMode() const
AddressMode addressW() const
void setTextureCompareOp(CompareOp op)
Sets the texture comparison function op.
void setAddressU(AddressMode mode)
Sets the horizontal wrap mode.
AddressMode addressU() const
CompareOp textureCompareOp() const
void setAddressV(AddressMode mode)
Sets the vertical wrap mode.
void setMagFilter(Filter f)
Sets the magnification filter mode to f.
friend size_t qHash(const QRhiScissor &v, size_t seed=0) noexcept
void setScissor(int x, int y, int w, int h)
Sets the scissor position and size to x, y, w, h.
std::array< int, 4 > scissor() const
friend bool operator==(const QRhiScissor &a, const QRhiScissor &b) noexcept
friend bool operator!=(const QRhiScissor &a, const QRhiScissor &b) noexcept
QRhiScissor()=default
Constructs an empty scissor.
Type
Specifies type of the shader resource bound to a binding point.
static void serializeLayoutDescription(const QRhiShaderResourceBinding *first, const QRhiShaderResourceBinding *last, Output dst)
StageFlag
Flag values to indicate which stages the shader resource is visible in.
void setBindings(InputIterator first, InputIterator last)
Sets the list of bindings from the iterators first and last.
QVarLengthArray< QRhiShaderResourceBinding, BINDING_PREALLOC > m_bindings
const QRhiShaderResourceBinding * cbeginBindings() const
void setBindings(std::initializer_list< QRhiShaderResourceBinding > list)
Sets the list of bindings.
QVector< quint32 > serializedLayoutDescription() const
const QRhiShaderResourceBinding * bindingAt(qsizetype index) const
qsizetype bindingCount() const
QVector< quint32 > m_layoutDesc
const QRhiShaderResourceBinding * cendBindings() const
void setShaderVariant(QShader::Variant v)
Sets the requested shader variant v.
void setShader(const QShader &s)
Sets the shader collection s.
QRhiShaderStage()=default
Constructs a shader stage description for the vertex stage with an empty QShader.
QShader::Variant shaderVariant() const
friend bool operator!=(const QRhiShaderStage &a, const QRhiShaderStage &b) noexcept
friend bool operator==(const QRhiShaderStage &a, const QRhiShaderStage &b) noexcept
friend size_t qHash(const QRhiShaderStage &v, size_t seed=0) noexcept
void setType(Type t)
Sets the type of the stage to t.
QRhiSwapChain * swapChain() const
QRhiSwapChain * m_swapchain
QSize currentPixelSize() const
void setDepthStencil(QRhiRenderBuffer *ds)
Sets the renderbuffer ds for use as a depth-stencil buffer.
virtual QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor()=0
QRhiSwapChainProxyData m_proxyData
virtual bool createOrResize()=0
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
virtual QRhiRenderTarget * currentFrameRenderTarget()=0
virtual QSize surfacePixelSize()=0
QRhiSwapChainProxyData proxyData() const
Flag
Flag values to describe swapchain properties.
void setSampleCount(int samples)
Sets the sample count.
void setFlags(Flags f)
Sets the flags f.
QRhiRenderPassDescriptor * renderPassDescriptor() const
Format
Describes the swapchain format.
void setWindow(QWindow *window)
Sets the window.
StereoTargetBuffer
Selects the backbuffer to use with a stereoscopic swapchain.
virtual bool isFormatSupported(Format f)=0
void setProxyData(const QRhiSwapChainProxyData &d)
Sets the proxy data d.
virtual QRhiCommandBuffer * currentFrameCommandBuffer()=0
QRhiRenderBuffer * depthStencil() const
void setFormat(Format f)
Sets the format f.
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
Associates with the QRhiRenderPassDescriptor desc.
void setSourceLevel(int level)
Sets the source mip level.
QPoint destinationTopLeft() const
QPoint sourceTopLeft() const
void setPixelSize(const QSize &sz)
Sets the size of the region to copy to sz.
void setDestinationLevel(int level)
Sets the destination mip level.
void setDestinationTopLeft(const QPoint &p)
Sets the destination top-left position p.
int destinationLevel() const
void setDestinationLayer(int layer)
Sets the destination array layer.
void setSourceTopLeft(const QPoint &p)
Sets the source top-left position to p.
int destinationLayer() const
void setSourceLayer(int layer)
Sets the source array layer.
QRhiTextureCopyDescription()=default
Constructs an empty texture copy description.
const QRhiColorAttachment * cbeginColorAttachments() const
void setDepthTexture(QRhiTexture *texture)
Sets the texture for depth-stencil.
QRhiTexture * depthTexture() const
void setDepthStencilBuffer(QRhiRenderBuffer *renderBuffer)
Sets the renderBuffer for depth-stencil.
const QRhiColorAttachment * cendColorAttachments() const
QRhiRenderBuffer * depthStencilBuffer() const
void setColorAttachments(std::initializer_list< QRhiColorAttachment > list)
Sets the list of color attachments.
const QRhiColorAttachment * colorAttachmentAt(qsizetype index) const
void setColorAttachments(InputIterator first, InputIterator last)
Sets the list of color attachments via the iterators first and last.
qsizetype colorAttachmentCount() const
QRhiTextureRenderTargetDescription()=default
Constructs an empty texture render target description.
void setDescription(const QRhiTextureRenderTargetDescription &desc)
Sets the render target description desc.
void setFlags(Flags f)
Sets the flags to f.
QRhiTextureRenderTargetDescription m_desc
virtual QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor()=0
Flag
Flag values describing the load/store behavior for the render target.
virtual bool create()=0
Creates the corresponding native graphics resources.
QRhiTextureRenderTargetDescription description() const
void setSourceTopLeft(const QPoint &p)
Sets the source top-left position p.
quint32 dataStride() const
QRhiTextureSubresourceUploadDescription()=default
Constructs an empty subresource description.
void setDataStride(quint32 stride)
Sets the data stride in bytes.
QPoint sourceTopLeft() const
void setDestinationTopLeft(const QPoint &p)
Sets the destination top-left position p.
void setData(const QByteArray &data)
Sets data.
void setSourceSize(const QSize &size)
Sets the source size in pixels.
void setImage(const QImage &image)
Sets image.
QPoint destinationTopLeft() const
const QRhiTextureUploadEntry * cendEntries() const
const QRhiTextureUploadEntry * cbeginEntries() const
QRhiTextureUploadDescription()=default
Constructs an empty texture upload description.
void setEntries(std::initializer_list< QRhiTextureUploadEntry > list)
Sets the list of entries.
const QRhiTextureUploadEntry * entryAt(qsizetype index) const
void setEntries(InputIterator first, InputIterator last)
Sets the list of entries using the iterators first and last.
qsizetype entryCount() const
void setLevel(int level)
Sets the mip level.
void setDescription(const QRhiTextureSubresourceUploadDescription &desc)
Sets the subresource description desc.
QRhiTextureSubresourceUploadDescription description() const
void setLayer(int layer)
Sets the layer.
QRhiTextureUploadEntry()=default
Constructs an empty QRhiTextureUploadEntry targeting layer 0 and level 0.
void setArrayRange(int startIndex, int count)
Normally all array layers are exposed and it is up to the shader to select the layer via the third co...
void setFormat(Format fmt)
Sets the requested texture format to fmt.
void setFlags(Flags f)
Sets the texture flags to f.
Flag
Flag values to specify how the texture is going to be used.
int arrayRangeStart() const
void setDepth(int depth)
Sets the depth for a 3D texture.
virtual bool create()=0
Creates the corresponding native graphics resources.
Format
Specifies the texture format.
void setArraySize(int arraySize)
Sets the texture arraySize.
void setSampleCount(int s)
Sets the sample count to s.
void setPixelSize(const QSize &sz)
Sets the texture size, specified in pixels, to sz.
int arrayRangeLength() const
void setMinDepth(float minDepth)
Sets the minDepth of the depth range of the viewport.
friend bool operator!=(const QRhiViewport &a, const QRhiViewport &b) noexcept
void setMaxDepth(float maxDepth)
Sets the maxDepth of the depth range of the viewport.
void setViewport(float x, float y, float w, float h)
Sets the viewport's position and size to x, y, w, and h.
std::array< float, 4 > viewport() const
friend size_t qHash(const QRhiViewport &v, size_t seed=0) noexcept
QRhiViewport()=default
Constructs a viewport description with an empty rectangle and a depth range of 0.0f - 1....
friend bool operator==(const QRhiViewport &a, const QRhiViewport &b) noexcept
Implementation
Describes which graphics API-specific backend gets used by a QRhi instance.
BeginFrameFlag
Flag values for QRhi::beginFrame()
ResourceLimit
Describes the resource limit to query.
@ MaxThreadsPerThreadGroup
@ MaxThreadGroupsPerDimension
EndFrameFlag
Flag values for QRhi::endFrame()
Feature
Flag values to indicate what features are supported by the backend currently in use.
@ NonDynamicUniformBuffers
@ RenderToNonBaseMipLevel
@ MultisampleRenderBuffer
@ PipelineCacheDataLoadSave
@ ReadBackNonUniformBuffer
@ RenderToOneDimensionalTexture
@ OneDimensionalTextureMipmaps
@ ReadBackNonBaseMipLevel
@ ThreeDimensionalTextureMipmaps
@ NonFourAlignedEffectiveIndexBufferOffset
@ ThreeDimensionalTextures
@ ReadBackAnyTextureFormat
FrameOpResult
Describes the result of operations that can have a soft failure.
@ FrameOpSwapChainOutOfDate
std::function< void(QRhi *)> CleanupCallback
Flag
Describes what special features to enable.
Variant
Describes what kind of shader code an entry contains.
QHash< int, QWidget * > hash
[35multi]
employee setName("Richard Schmit")
Combined button and popup list for selecting options.
static std::unique_ptr< QRhiGraphicsPipeline > newGraphicsPipeline(QRhi *rhi, QRhiShaderResourceBindings *shaderResourceBindings, QRhiRenderPassDescriptor *renderPassDescriptor, QShader vertexShader, QShader fragmentShader)
std::pair< T1, T2 > QPair
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
static int resourceType(const QByteArray &key)
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint const GLuint GLuint const GLuint * textures
GLenum GLenum GLenum GLenum dstAlpha
GLenum GLenum GLsizei count
GLenum GLenum GLenum srcAlpha
const void GLsizei GLsizei stride
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLsizeiptr const void GLenum usage
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiDepthStencilClearValue &)
Q_GUI_EXPORT size_t qHash(const QRhiShaderResourceBinding &b, size_t seed=0) noexcept
static constexpr QSize sizeForMipLevel(int mipLevel, const QSize &baseLevelSize)
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
QVideoFrameFormat::PixelFormat fmt
static QInputDevice::DeviceType deviceType(const UINT cursorType)
view viewport() -> scroll(dx, dy, deviceRect)
myFilter draw(painter, QPoint(0, 0), originalPixmap)
DeviceType
Specifies the graphics device's type, when the information is available.
\variable QRhiGraphicsPipeline::TargetBlend::colorWrite
\variable QRhiReadbackResult::completed
QRhiTexture::Format format
TextureAndOrSamplerData stex
QRhiShaderResourceBinding::StageFlags stage
Output serialize(Output dst) const
QRhiShaderResourceBinding::Type type
float maxPotentialColorComponentValue
LimitsType
\value LuminanceInNits Indicates that the \l limits union has its luminanceInNits struct set
float maxColorComponentValue
\qmltype MapCircle \instantiates QDeclarativeCircleMapItem \inqmlmodule QtLocation