Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgdistancefieldglyphnode_p.cpp
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
6#include <QtGui/qsurface.h>
7#include <QtGui/qwindow.h>
8#include <qmath.h>
9
11
12static float qt_sg_envFloat(const char *name, float defaultValue)
13{
15 return defaultValue;
16 bool ok = false;
17 const float value = qgetenv(name).toFloat(&ok);
18 return ok ? value : defaultValue;
19}
20
21static float thresholdFunc(float glyphScale)
22{
23 static const float base = qt_sg_envFloat("QT_DF_BASE", 0.5f);
24 static const float baseDev = qt_sg_envFloat("QT_DF_BASEDEVIATION", 0.065f);
25 static const float devScaleMin = qt_sg_envFloat("QT_DF_SCALEFORMAXDEV", 0.15f);
26 static const float devScaleMax = qt_sg_envFloat("QT_DF_SCALEFORNODEV", 0.3f);
27 return base - ((qBound(devScaleMin, glyphScale, devScaleMax) - devScaleMin) / (devScaleMax - devScaleMin) * -baseDev + baseDev);
28}
29
30static float spreadFunc(float glyphScale)
31{
32 static const float range = qt_sg_envFloat("QT_DF_RANGE", 0.06f);
33 return range / glyphScale;
34}
35
37{
38public:
39 QSGDistanceFieldTextMaterialRhiShader(bool alphaTexture, int viewCount);
40
42 QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
43
45 QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
46
47protected:
48 float m_fontScale = 1.0;
49 float m_matrixScale = 1.0;
51};
52
54{
55 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext.vert.qsb"), viewCount);
56 if (alphaTexture)
57 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext_a.frag.qsb"), viewCount);
58 else
59 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext.frag.qsb"), viewCount);
60}
61
63 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
64{
65 Q_ASSERT(oldMaterial == nullptr || newMaterial->type() == oldMaterial->type());
66 QSGDistanceFieldTextMaterial *mat = static_cast<QSGDistanceFieldTextMaterial *>(newMaterial);
67 QSGDistanceFieldTextMaterial *oldMat = static_cast<QSGDistanceFieldTextMaterial *>(oldMaterial);
68
69 // updateUniformData() is called before updateSampledImage() by the
70 // renderer. Hence updating the glyph cache stuff here.
71 const bool textureUpdated = mat->updateTextureSizeAndWrapper();
72 Q_ASSERT(mat->wrapperTexture());
73 Q_ASSERT(oldMat == nullptr || oldMat->texture());
74
75 bool changed = false;
76 QByteArray *buf = state.uniformData();
77 Q_ASSERT(buf->size() >= 104);
78
79 bool updateRange = false;
80 if (!oldMat || mat->fontScale() != oldMat->fontScale()) {
81 m_fontScale = mat->fontScale();
82 updateRange = true;
83 }
84 if (state.isMatrixDirty()) {
85 m_matrixScale = qSqrt(qAbs(state.determinant())) * state.devicePixelRatio();
86 updateRange = true;
87 }
88 quint32 offset = 0;
89 const int matrixCount = qMin(state.projectionMatrixCount(), newMaterial->viewCount());
90 for (int viewIndex = 0; viewIndex < matrixCount; ++viewIndex) {
91 if (state.isMatrixDirty()) {
92 const QMatrix4x4 m = state.combinedMatrix(viewIndex);
93 memcpy(buf->data() + 64 * viewIndex, m.constData(), 64);
94 changed = true;
95 }
96 offset += 64;
97 }
98 if (textureUpdated || !oldMat || oldMat->texture()->texture != mat->texture()->texture) {
99 const QVector2D ts(1.0f / mat->textureSize().width(), 1.0f / mat->textureSize().height());
100 Q_ASSERT(sizeof(ts) == 8);
101 memcpy(buf->data() + offset, &ts, 8);
102 changed = true;
103 }
104 offset += 8 + 8; // 8 is padding for vec4 alignment
105 if (!oldMat || mat->color() != oldMat->color() || state.isOpacityDirty()) {
106 const QVector4D color = mat->color() * state.opacity();
107 Q_ASSERT(sizeof(color) == 16);
108 memcpy(buf->data() + offset, &color, 16);
109 changed = true;
110 }
111 offset += 16;
112 if (updateRange) { // deferred because depends on m_fontScale and m_matrixScale
113 const float combinedScale = m_fontScale * m_matrixScale;
114 const float base = thresholdFunc(combinedScale);
115 const float range = spreadFunc(combinedScale);
116 const QVector2D alphaMinMax(qMax(0.0f, base - range), qMin(base + range, 1.0f));
117 memcpy(buf->data() + offset, &alphaMinMax, 8);
118 changed = true;
119 }
120 offset += 8; // not adding any padding here since we are not sure what comes afterwards in the subclasses' shaders
121
122 // move texture uploads/copies onto the renderer's soon-to-be-committed list
123 static_cast<QSGRhiDistanceFieldGlyphCache *>(mat->glyphCache())->commitResourceUpdates(state.resourceUpdateBatch());
124
126 return changed;
127}
128
130 QSGMaterial *newMaterial, QSGMaterial *)
131{
133 if (binding != 1)
134 return;
135
136 QSGDistanceFieldTextMaterial *mat = static_cast<QSGDistanceFieldTextMaterial *>(newMaterial);
137 QSGTexture *t = mat->wrapperTexture();
139 *texture = t;
140}
141
147
149 : QSGDistanceFieldTextMaterialRhiShader(alphaTexture, viewCount)
150{
151 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext.vert.qsb"), viewCount);
152 if (alphaTexture)
153 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext_a_fwidth.frag.qsb"), viewCount);
154 else
155 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldtext_fwidth.frag.qsb"), viewCount);
156}
157
159 : m_glyph_cache(nullptr)
160 , m_texture(nullptr)
161 , m_fontScale(1.0)
162 , m_sgTexture(nullptr)
163{
165}
166
171
177
179{
180 float r, g, b, a;
181 color.getRgbF(&r, &g, &b, &a);
182 m_color = QVector4D(r * a, g * a, b * a, a);
183}
184
192
194{
195 if (!m_texture)
196 m_texture = m_glyph_cache->glyphTexture(0); // invalid texture
197
198 if (m_texture->size != m_size) {
200 return true;
201 }
202
203 return false;
204}
205
206// When using the RHI we need a QSGTexture wrapping the QRhiTexture, just
207// exposing a QRhiTexture * (which would be the equivalent of GLuint textureId)
208// is not sufficient to play nice with the material.
210{
211 bool updated = updateTextureSize();
212 if (updated) {
213 if (m_sgTexture)
214 delete m_sgTexture;
219 }
220 return updated;
221}
222
224{
225 Q_ASSERT(o && type() == o->type());
227 if (m_glyph_cache != other->m_glyph_cache)
228 return m_glyph_cache - other->m_glyph_cache;
229 if (m_fontScale != other->m_fontScale) {
230 return int(other->m_fontScale < m_fontScale) - int(m_fontScale < other->m_fontScale);
231 }
232 if (m_color != other->m_color)
233 return &m_color < &other->m_color ? -1 : 1;
235 qintptr t1 = other->m_texture ? qintptr(other->m_texture->texture) : 0;
236 const qintptr diff = t0 - t1;
237 return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
238}
240{
241public:
242 DistanceFieldStyledTextMaterialRhiShader(bool alphaTexture, int viewCount);
243
244 bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
245};
246
251
253 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
254{
255 bool changed = QSGDistanceFieldTextMaterialRhiShader::updateUniformData(state, newMaterial, oldMaterial);
258
259 QByteArray *buf = state.uniformData();
260 Q_ASSERT(buf->size() >= 128);
261
262 // must add 8 bytes padding for vec4 alignment, the base class did not do this
263 m_currentUbufOffset += 8; // now at StyleColor
264
265 if (!oldMat || mat->styleColor() != oldMat->styleColor() || state.isOpacityDirty()) {
266 QVector4D styleColor = mat->styleColor();
267 styleColor *= state.opacity();
268
269 memcpy(buf->data() + m_currentUbufOffset, &styleColor, 16);
270 changed = true;
271 }
273
274 return changed;
275}
276
281
285
287{
288 float r, g, b, a;
289 color.getRgbF(&r, &g, &b, &a);
290 m_styleColor = QVector4D(r * a, g * a, b * a, a);
291}
292
294{
295 Q_ASSERT(o && type() == o->type());
297 if (m_styleColor != other->m_styleColor)
298 return &m_styleColor < &other->m_styleColor ? -1 : 1;
300}
301
303{
304public:
305 DistanceFieldOutlineTextMaterialRhiShader(bool alphaTexture, int viewCount);
306
307 bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
308};
309
311 : DistanceFieldStyledTextMaterialRhiShader(alphaTexture, viewCount)
312{
313 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext.vert.qsb"), viewCount);
314 if (alphaTexture)
315 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsb"), viewCount);
316 else
317 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsb"), viewCount);
318}
319
325
327 : DistanceFieldOutlineTextMaterialRhiShader(alphaTexture, viewCount)
328{
329 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext.vert.qsb"), viewCount);
330 if (alphaTexture)
331 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext_a_fwidth.frag.qsb"), viewCount);
332 else
333 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldoutlinetext_fwidth.frag.qsb"), viewCount);
334}
335
337 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
338{
339 bool changed = DistanceFieldStyledTextMaterialRhiShader::updateUniformData(state, newMaterial, oldMaterial);
342
343 QByteArray *buf = state.uniformData();
344 Q_ASSERT(buf->size() >= 136);
345
346 if (!oldMat || mat->fontScale() != oldMat->fontScale() || state.isMatrixDirty()) {
347 float dfRadius = mat->glyphCache()->distanceFieldRadius();
348 float combinedScale = m_fontScale * m_matrixScale;
349 float base = thresholdFunc(combinedScale);
350 float range = spreadFunc(combinedScale);
351 float outlineLimit = qMax(0.2f, base - 0.5f / dfRadius / m_fontScale);
352 float alphaMin = qMax(0.0f, base - range);
353 float styleAlphaMin0 = qMax(0.0f, outlineLimit - range);
354 float styleAlphaMin1 = qMin(outlineLimit + range, alphaMin);
355 memcpy(buf->data() + m_currentUbufOffset, &styleAlphaMin0, 4);
356 memcpy(buf->data() + m_currentUbufOffset + 4, &styleAlphaMin1, 4);
357 changed = true;
358 }
359
360 return changed;
361}
362
367
371
377
385
387{
388public:
389 DistanceFieldShiftedStyleTextMaterialRhiShader(bool alphaTexture, int viewCount);
390
391 bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
392};
393
395 : DistanceFieldStyledTextMaterialRhiShader(alphaTexture, viewCount)
396{
397 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext.vert.qsb"), viewCount);
398 if (alphaTexture)
399 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext_a.frag.qsb"), viewCount);
400 else
401 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext.frag.qsb"), viewCount);
402}
403
405 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
406{
407 bool changed = DistanceFieldStyledTextMaterialRhiShader::updateUniformData(state, newMaterial, oldMaterial);
410
411 QByteArray *buf = state.uniformData();
412 Q_ASSERT(buf->size() >= 136);
413
414 if (!oldMat || oldMat->fontScale() != mat->fontScale() || oldMat->shift() != mat->shift()
415 || oldMat->textureSize() != mat->textureSize())
416 {
417 QVector2D shift(1.0 / mat->fontScale() * mat->shift().x(),
418 1.0 / mat->fontScale() * mat->shift().y());
419 memcpy(buf->data() + m_currentUbufOffset, &shift, 8);
420 changed = true;
421 }
422
423 return changed;
424}
425
431
433 : DistanceFieldShiftedStyleTextMaterialRhiShader(alphaTexture, viewCount)
434{
435 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext.vert.qsb"), viewCount);
436 if (alphaTexture)
437 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext_a_fwidth.frag.qsb"), viewCount);
438 else
439 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/distancefieldshiftedtext_fwidth.frag.qsb"), viewCount);
440}
441
446
450
456
464
472
474{
475public:
476 QSGHiQSubPixelDistanceFieldTextMaterialRhiShader(bool alphaTexture, int viewCount);
477
478 bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
480 QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
481};
482
484 : QSGDistanceFieldTextMaterialRhiShader(alphaTexture, viewCount)
485{
487 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/hiqsubpixeldistancefieldtext.vert.qsb"), viewCount);
488 if (alphaTexture)
489 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/hiqsubpixeldistancefieldtext_a.frag.qsb"), viewCount);
490 else
491 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/hiqsubpixeldistancefieldtext.frag.qsb"), viewCount);
492}
493
495 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
496{
497 bool changed = QSGDistanceFieldTextMaterialRhiShader::updateUniformData(state, newMaterial, oldMaterial);
500
501 QByteArray *buf = state.uniformData();
502 Q_ASSERT(buf->size() >= 128);
503
504 if (!oldMat || mat->fontScale() != oldMat->fontScale()) {
505 float fontScale = mat->fontScale();
506 memcpy(buf->data() + m_currentUbufOffset, &fontScale, 4);
507 changed = true;
508 }
509 m_currentUbufOffset += 4 + 4; // 4 for padding for vec2 alignment
510
511 if (!oldMat || state.isMatrixDirty()) {
512 int viewportWidth = state.viewportRect().width();
513 QMatrix4x4 mat = state.combinedMatrix().inverted();
514 QVector4D vecDelta = mat.column(0) * (qreal(2) / viewportWidth);
515 memcpy(buf->data() + m_currentUbufOffset, &vecDelta, 16);
516 }
517
518 return changed;
519}
520
522 QSGMaterial *newMaterial, QSGMaterial *oldMaterial)
523{
525 Q_UNUSED(oldMaterial);
527
528 ps->blendEnable = true;
529 ps->srcColor = GraphicsPipelineState::ConstantColor;
530 ps->dstColor = GraphicsPipelineState::OneMinusSrcColor;
531
532 const QVector4D color = mat->color();
533 // this is dynamic state but it's - magic! - taken care of by the renderer
534 ps->blendConstant = QColor::fromRgbF(color.x(), color.y(), color.z(), 1.0f);
535
536 return true;
537}
538
544
552
558
560 : QSGHiQSubPixelDistanceFieldTextMaterialRhiShader(alphaTexture, viewCount)
561{
562 setShaderFileName(VertexStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb"), viewCount);
563 if (alphaTexture)
564 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/loqsubpixeldistancefieldtext_a.frag.qsb"), viewCount);
565 else
566 setShaderFileName(FragmentStage, QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.frag.qsb"), viewCount);
567}
568
574
582
DistanceFieldAnisotropicOutlineTextMaterialRhiShader(bool alphaTexture, int viewCount)
DistanceFieldAnisotropicShiftedTextMaterialRhiShader(bool alphaTexture, int viewCount)
DistanceFieldAnisotropicTextMaterialRhiShader(bool alphaTexture, int viewCount)
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
DistanceFieldOutlineTextMaterialRhiShader(bool alphaTexture, int viewCount)
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
DistanceFieldShiftedStyleTextMaterialRhiShader(bool alphaTexture, int viewCount)
DistanceFieldStyledTextMaterialRhiShader(bool alphaTexture, int viewCount)
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
\inmodule QtCore
Definition qbytearray.h:57
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
static QColor fromRgbF(float r, float g, float b, float a=1.0)
Static convenience function that returns a QColor constructed from the RGB color values,...
Definition qcolor.cpp:2427
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
QMatrix4x4 inverted(bool *invertible=nullptr) const
Returns the inverse of this matrix.
virtual bool screenSpaceDerivativesSupported() const =0
const Texture * glyphTexture(glyph_t glyph)
virtual bool eightBitFormatIsAlphaSwizzled() const =0
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
QSGMaterialType * type() const override=0
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to prepare use of sampled images in the shader,...
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
QSGDistanceFieldTextMaterialRhiShader(bool alphaTexture, int viewCount)
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
virtual void setColor(const QColor &color)
const QSGDistanceFieldGlyphCache::Texture * m_texture
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QSGDistanceFieldGlyphCache * m_glyph_cache
QSGHiQSubPixelDistanceFieldTextMaterialRhiShader(bool alphaTexture, int viewCount)
bool updateGraphicsPipelineState(RenderState &state, GraphicsPipelineState *ps, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to enable the material to provide a custom set of graphics...
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QSGLoQSubPixelDistanceFieldTextMaterialRhiShader(bool alphaTexture, int viewCount)
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
Encapsulates the current rendering state during a call to QSGMaterialShader::updateUniformData() and ...
The QSGMaterialShader class represents a graphics API independent shader program.
void setShaderFileName(Stage stage, const QString &filename)
Sets the filename for the shader for the specified stage.
void setFlag(Flags flags, bool on=true)
Sets the flags on this material shader if on is true; otherwise clears the specified flags.
The QSGMaterial class encapsulates rendering state for a shader program.
Definition qsgmaterial.h:15
int viewCount() const
void setFlag(Flags flags, bool on=true)
Sets the flags flags on this material if on is true; otherwise clears the attribute.
@ RequiresDeterminant
Definition qsgmaterial.h:19
void setTextureSize(const QSize &size)
void setTexture(QRhiTexture *texture)
void setOwnsTexture(bool owns)
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
\inmodule QtQuick
Definition qsgtexture.h:20
void setFiltering(Filtering filter)
Sets the sampling mode to filter.
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:31
The QVector4D class represents a vector or vertex in 4D space.
Definition qvectornd.h:330
else opt state
[0]
Combined button and popup list for selecting options.
static QT_WARNING_DISABLE_FLOAT_COMPARE ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold)
Definition qbezier.cpp:207
#define Q_LIKELY(x)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
qfloat16 qSqrt(qfloat16 f)
Definition qfloat16.h:289
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
constexpr const T & qBound(const T &min, const T &val, const T &max)
Definition qminmax.h:44
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
GLboolean GLboolean GLboolean b
const GLfloat * m
GLboolean GLboolean GLboolean GLboolean a
[7]
GLboolean r
[2]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
[4]
GLsizei range
GLuint color
[2]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint texture
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLenum GLuint GLintptr offset
GLboolean GLboolean g
GLuint name
GLdouble GLdouble t
Definition qopenglext.h:243
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
static float thresholdFunc(float glyphScale)
static QT_BEGIN_NAMESPACE float qt_sg_envFloat(const char *name, float defaultValue)
static float spreadFunc(float glyphScale)
#define QStringLiteral(str)
#define t1
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
#define Q_UNUSED(x)
unsigned int quint32
Definition qtypes.h:50
double qreal
Definition qtypes.h:187
ptrdiff_t qintptr
Definition qtypes.h:166
static const uint base
Definition qurlidna.cpp:20
QObject::connect nullptr
QSharedPointer< T > other(t)
[5]
Describes state changes that the material wants to apply to the currently active graphics pipeline st...
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.