53 #include <QtGui/private/qshader_p.h>
57 static float vertexData[] = {
58 0.0f, 0.5f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
59 -0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
60 0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f
74 #ifdef VBUF_IS_DYNAMIC
96 premulAlphaBlend.
enable =
true;
98 for (
int i = 0;
i < m_colorAttCount; ++
i)
99 rtblends << premulAlphaBlend;
121 { 7 *
sizeof(float) }
160 static int messWithBufferTrigger = 0;
163 if (!(messWithBufferTrigger & 1)) {
167 ++messWithBufferTrigger;
172 #ifdef VBUF_IS_DYNAMIC
186 m_opacity += m_opacityDir * 0.005f;
187 if (m_opacity < 0.0f || m_opacity > 1.0f) {
189 m_opacity = qBound(0.0f, m_opacity, 1.0f);
196 cb->setGraphicsPipeline(m_ps);
198 cb->setShaderResources();
200 cb->setVertexInput(0, 1, &vbufBinding);
small capitals from c petite p scientific i
[1]
The QFile class provides an interface for reading from and writing to files.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void rotate(float angle, const QVector3D &vector)
void scale(const QVector3D &vector)
void perspective(float verticalAngle, float aspectRatio, float nearPlane, float farPlane)
const float * constData() const
void translate(const QVector3D &vector)
QPair< QRhiBuffer *, quint32 > VertexInput
void setTargetBlends(std::initializer_list< TargetBlend > list)
void setDepthWrite(bool enable)
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
void setDepthOp(CompareOp op)
void setVertexInputLayout(const QRhiVertexInputLayout &layout)
void setShaderStages(std::initializer_list< QRhiShaderStage > list)
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
void setSampleCount(int s)
void setDepthTest(bool enable)
QMatrix4x4 clipSpaceCorrMatrix() const
QRhiShaderResourceBindings * newShaderResourceBindings()
QRhiBuffer * newBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, int size)
QRhiGraphicsPipeline * newGraphicsPipeline()
void setName(const QByteArray &name)
void uploadStaticBuffer(QRhiBuffer *buf, int offset, int size, const void *data)
void updateDynamicBuffer(QRhiBuffer *buf, int offset, int size, const void *data)
static QRhiShaderResourceBinding uniformBuffer(int binding, StageFlags stage, QRhiBuffer *buf)
void setBindings(std::initializer_list< QRhiShaderResourceBinding > list)
static QShader fromSerialized(const QByteArray &data)
The QSize class defines the size of a two-dimensional object using integer point precision.
constexpr int height() const noexcept
constexpr int width() const noexcept
The QString class provides a Unicode character string.
const_iterator cbegin() const noexcept
const_iterator cend() const noexcept
void queueDraw(QRhiCommandBuffer *cb, const QSize &outputSizeInPixels)
void releaseResources() override
void queueResourceUpdates(QRhiResourceUpdateBatch *resourceUpdates)
void initResources() override
void resize(const QSize &pixelSize)
QShader getShader(const QString &name)
#define QByteArrayLiteral(str)
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)