53 #include <QtGui/private/qshader_p.h>
60 static float vertexData[] =
62 -0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
63 -0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
64 0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
65 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f
130 mvp.
rotate(m_rotation, 0, 1, 0);
133 if (!m_opacityReady) {
134 m_opacityReady =
true;
135 const float opacity = 1.0f;
142 cb->setGraphicsPipeline(m_ps);
144 cb->setShaderResources(m_srb);
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void rotate(float angle, 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
QMatrix4x4 clipSpaceCorrMatrix() const
QRhiShaderResourceBindings * newShaderResourceBindings()
QRhiBuffer * newBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, int size)
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)
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
void queueResourceUpdates(QRhiResourceUpdateBatch *resourceUpdates)
void initResources(QRhiRenderPassDescriptor *rp)
void queueDraw(QRhiCommandBuffer *cb, const QSize &outputSizeInPixels)
void resize(const QSize &pixelSize)
void setPipeline(QRhiGraphicsPipeline *ps)
QRhiGraphicsPipeline * ps
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)