5#include <QtQuick3DRuntimeRender/private/qssgrhiquadrenderer_p.h>
6#include <QtQuick3DUtils/private/qquick3dprofiler_p.h>
46 constexpr int vertexCount = 8;
47 m_vbuf = std::make_shared<QSSGRhiBuffer>(*rhiCtx,
51 5 * vertexCount *
sizeof(
float));
53 float buf[5 * vertexCount];
55 for (
int i = 0;
i < vertexCount; ++
i) {
62 rub->uploadStaticBuffer(m_vbuf->buffer(),
buf);
65 m_ibuf = std::make_shared<QSSGRhiBuffer>(*rhiCtx,
73 rub->uploadStaticBuffer(m_ibuf->buffer(),
buf);
80 ensureBuffers(rhiCtx, rub);
91 ia.inputLayout.setAttributes({
95 ia.inputs << QSSGRhiInputAssemblerState::PositionSemantic << QSSGRhiInputAssemblerState::TexCoord0Semantic;
98 ia.inputs << QSSGRhiInputAssemblerState::PositionSemantic;
100 ia.inputLayout.setBindings({ 5 *
sizeof(float) });
127 cb->setGraphicsPipeline(pipeline);
128 cb->setShaderResources(srb);
135 cb->setVertexInput(0, 1, &vb, m_ibuf->buffer(), m_ibuf->indexFormat());
156 ensureBuffers(rhiCtx, rub);
166 ia.inputs << QSSGRhiInputAssemblerState::PositionSemantic;
167 ia.inputLayout.setBindings({ 3 *
sizeof(float) });
194 cb->setGraphicsPipeline(pipeline);
195 cb->setShaderResources(srb);
200 cb->setVertexInput(0, 1, &vb, m_ibuf->buffer(), m_ibuf->indexFormat());
209 constexpr int vertexCount = 8;
210 m_vbuf = std::make_shared<QSSGRhiBuffer>(*rhiCtx,
214 3 * vertexCount *
sizeof(
float));
217 float buf[3 * vertexCount];
219 for (
int i = 0;
i < vertexCount; ++
i) {
224 rub->uploadStaticBuffer(m_vbuf->buffer(),
buf);
227 m_ibuf = std::make_shared<QSSGRhiBuffer>(*rhiCtx,
234 rub->uploadStaticBuffer(m_ibuf->buffer(),
g_rectIndex);
void resourceUpdate(QRhiResourceUpdateBatch *resourceUpdates)
Sometimes committing resource updates is necessary or just more convenient without starting a render ...
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
QRhiRenderPassDescriptor * renderPassDescriptor() const
QRhiResourceUpdateBatch * nextResourceUpdateBatch()
static QSSGRhiContextPrivate * get(QSSGRhiContext *q)
QRhiCommandBuffer * commandBuffer() const
QRhiCommandBuffer::BeginPassFlags commonPassFlags() const
void prepareCube(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *maybeRub)
void recordRenderCube(QSSGRhiContext *rhiCtx, QSSGRhiGraphicsPipelineState *ps, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpDesc, QSSGRhiQuadRenderer::Flags flags)
QRhiGraphicsPipeline::CullMode cullMode
QRhiGraphicsPipeline::TargetBlend targetBlend
void recordRenderQuadPass(QSSGRhiContext *rhiCtx, QSSGRhiGraphicsPipelineState *ps, QRhiShaderResourceBindings *srb, QRhiTextureRenderTarget *rt, Flags flags)
void recordRenderQuad(QSSGRhiContext *rhiCtx, QSSGRhiGraphicsPipelineState *ps, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpDesc, Flags flags)
void prepareQuad(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *maybeRub)
The QVector2D class represents a vector or vertex in 2D space.
The QVector3D class represents a vector or vertex in 3D space.
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define Q_QUICK3D_PROFILE_START(Type)
#define Q_QUICK3D_PROFILE_END_WITH_STRING(Type, Payload, Str)
#define QSSGRHICTX_STAT(ctx, f)
static QT_BEGIN_NAMESPACE const QVector3D g_fullScreenRectFaces[]
static const QVector2D g_fullScreenRectUVs[]
static const quint16 g_rectIndex[]
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)