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
qsgbasicinternalimagenode.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
5
6#include <QtCore/qvarlengtharray.h>
7#include <QtCore/qmath.h>
8
10
11namespace
12{
14 {
15 float x, y, u, v;
16 float dx, dy, du, dv;
17 };
18
30}
31
33 : m_innerSourceRect(0, 0, 1, 1)
34 , m_subSourceRect(0, 0, 1, 1)
35 , m_antialiasing(false)
36 , m_mirrorHorizontally(false)
37 , m_mirrorVertically(false)
38 , m_dirtyGeometry(false)
39 , m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4)
40 , m_dynamicTexture(nullptr)
41{
43
44#ifdef QSG_RUNTIME_DESCRIPTION
45 qsgnode_set_description(this, QLatin1String("internalimage"));
46#endif
47}
48
50{
51 if (rect == m_targetRect)
52 return;
54 m_dirtyGeometry = true;
55}
56
64
72
80
82{
84
87
89
90 // Because the texture can be a different part of the atlas, we need to update it...
91 m_dirtyGeometry = true;
92}
93
95{
96 if (antialiasing == m_antialiasing)
97 return;
98 m_antialiasing = antialiasing;
99 if (m_antialiasing) {
100 setGeometry(new QSGGeometry(smoothImageAttributeSet(), 0));
101 setFlag(OwnsGeometry, true);
102 } else {
104 setFlag(OwnsGeometry, false);
105 }
107 m_dirtyGeometry = true;
108}
109
110void QSGBasicInternalImageNode::setMirror(bool mirrorHorizontally, bool mirrorVertically)
111{
112 if (mirrorHorizontally == m_mirrorHorizontally && mirrorVertically == m_mirrorVertically)
113 return;
114 m_mirrorHorizontally = mirrorHorizontally;
115 m_mirrorVertically = mirrorVertically;
116 m_dirtyGeometry = true;
117}
118
119
125
127{
128 bool doDirty = false;
129 QSGDynamicTexture *t = qobject_cast<QSGDynamicTexture *>(materialTexture());
130 if (t) {
131 doDirty = t->updateTexture();
132 if (doDirty) {
133 // The geometry may need updating. This is expensive however, so do
134 // it only when something relevant has changed.
135 if (t != m_dynamicTexture
137 || t->normalizedTextureSubRect() != m_dynamicTextureSubRect) {
139 m_dynamicTextureSize = t->textureSize();
140 m_dynamicTextureSubRect = t->normalizedTextureSubRect();
141 }
142 }
143 }
145
147 doDirty = true;
148
149 if (doDirty)
151}
152
153namespace {
154 struct X { float x, tx; };
155 struct Y { float y, ty; };
156}
157
158static inline void appendQuad(int indexType, void **indexData,
159 int topLeft, int topRight,
160 int bottomLeft, int bottomRight)
161{
162 if (indexType == QSGGeometry::UnsignedIntType) {
163 quint32 *indices = static_cast<quint32 *>(*indexData);
164 *indices++ = topLeft;
165 *indices++ = bottomLeft;
166 *indices++ = bottomRight;
167 *indices++ = bottomRight;
168 *indices++ = topRight;
169 *indices++ = topLeft;
170 *indexData = indices;
171 } else {
173 quint16 *indices = static_cast<quint16 *>(*indexData);
174 *indices++ = topLeft;
175 *indices++ = bottomLeft;
176 *indices++ = bottomRight;
177 *indices++ = bottomRight;
178 *indices++ = topRight;
179 *indices++ = topLeft;
180 *indexData = indices;
181 }
182}
183
185 const QRectF &innerTargetRect,
186 const QRectF &sourceRect,
187 const QRectF &innerSourceRect,
188 const QRectF &subSourceRect,
189 QSGGeometry *geometry,
190 bool mirrorHorizontally,
191 bool mirrorVertically,
192 bool antialiasing)
193{
194 int floorLeft = qFloor(subSourceRect.left());
195 int ceilRight = qCeil(subSourceRect.right());
196 int floorTop = qFloor(subSourceRect.top());
197 int ceilBottom = qCeil(subSourceRect.bottom());
198 int hTiles = ceilRight - floorLeft;
199 int vTiles = ceilBottom - floorTop;
200
201 int hCells = hTiles;
202 int vCells = vTiles;
203 if (innerTargetRect.width() == 0)
204 hCells = 0;
205 if (innerTargetRect.left() != targetRect.left())
206 ++hCells;
207 if (innerTargetRect.right() != targetRect.right())
208 ++hCells;
209 if (innerTargetRect.height() == 0)
210 vCells = 0;
211 if (innerTargetRect.top() != targetRect.top())
212 ++vCells;
213 if (innerTargetRect.bottom() != targetRect.bottom())
214 ++vCells;
215
216 QVarLengthArray<X, 32> xData(2 * hCells);
217 QVarLengthArray<Y, 32> yData(2 * vCells);
218 X *xs = xData.data();
219 Y *ys = yData.data();
220
221 if (innerTargetRect.left() != targetRect.left()) {
222 xs[0].x = targetRect.left();
223 xs[0].tx = sourceRect.left();
224 xs[1].x = innerTargetRect.left();
225 xs[1].tx = innerSourceRect.left();
226 xs += 2;
227 }
228 if (innerTargetRect.width() != 0 && hTiles > 0) {
229 xs[0].x = innerTargetRect.left();
230 xs[0].tx = innerSourceRect.x() + (subSourceRect.left() - floorLeft) * innerSourceRect.width();
231 ++xs;
232 float b = innerTargetRect.width() / subSourceRect.width();
233 float a = innerTargetRect.x() - subSourceRect.x() * b;
234 for (int i = floorLeft + 1; i <= ceilRight - 1; ++i) {
235 xs[0].x = xs[1].x = a + b * i;
236 xs[0].tx = innerSourceRect.right();
237 xs[1].tx = innerSourceRect.left();
238 xs += 2;
239 }
240 xs[0].x = innerTargetRect.right();
241 xs[0].tx = innerSourceRect.x() + (subSourceRect.right() - ceilRight + 1) * innerSourceRect.width();
242 ++xs;
243 }
244 if (innerTargetRect.right() != targetRect.right()) {
245 xs[0].x = innerTargetRect.right();
246 xs[0].tx = innerSourceRect.right();
247 xs[1].x = targetRect.right();
248 xs[1].tx = sourceRect.right();
249 xs += 2;
250 }
251 Q_ASSERT(xs == xData.data() + xData.size());
252 if (mirrorHorizontally) {
253 float leftPlusRight = targetRect.left() + targetRect.right();
254 int count = xData.size();
255 xs = xData.data();
256 for (int i = 0; i < (count >> 1); ++i)
257 qSwap(xs[i], xs[count - 1 - i]);
258 for (int i = 0; i < count; ++i)
259 xs[i].x = leftPlusRight - xs[i].x;
260 }
261
262 if (innerTargetRect.top() != targetRect.top()) {
263 ys[0].y = targetRect.top();
264 ys[0].ty = sourceRect.top();
265 ys[1].y = innerTargetRect.top();
266 ys[1].ty = innerSourceRect.top();
267 ys += 2;
268 }
269 if (innerTargetRect.height() != 0 && vTiles > 0) {
270 ys[0].y = innerTargetRect.top();
271 ys[0].ty = innerSourceRect.y() + (subSourceRect.top() - floorTop) * innerSourceRect.height();
272 ++ys;
273 float b = innerTargetRect.height() / subSourceRect.height();
274 float a = innerTargetRect.y() - subSourceRect.y() * b;
275 for (int i = floorTop + 1; i <= ceilBottom - 1; ++i) {
276 ys[0].y = ys[1].y = a + b * i;
277 ys[0].ty = innerSourceRect.bottom();
278 ys[1].ty = innerSourceRect.top();
279 ys += 2;
280 }
281 ys[0].y = innerTargetRect.bottom();
282 ys[0].ty = innerSourceRect.y() + (subSourceRect.bottom() - ceilBottom + 1) * innerSourceRect.height();
283 ++ys;
284 }
285 if (innerTargetRect.bottom() != targetRect.bottom()) {
286 ys[0].y = innerTargetRect.bottom();
287 ys[0].ty = innerSourceRect.bottom();
288 ys[1].y = targetRect.bottom();
289 ys[1].ty = sourceRect.bottom();
290 ys += 2;
291 }
292 Q_ASSERT(ys == yData.data() + yData.size());
293 if (mirrorVertically) {
294 float topPlusBottom = targetRect.top() + targetRect.bottom();
295 int count = yData.size();
296 ys = yData.data();
297 for (int i = 0; i < (count >> 1); ++i)
298 qSwap(ys[i], ys[count - 1 - i]);
299 for (int i = 0; i < count; ++i)
300 ys[i].y = topPlusBottom - ys[i].y;
301 }
302
304 // We can handled up to 0xffff indices, but keep the limit lower here to
305 // merge better in the batch renderer.
306 if (hCells * vCells * 4 > 0x7fff)
308
309 if (antialiasing) {
310 if (!geometry || geometry->indexType() != indexType) {
311 geometry = new QSGGeometry(smoothImageAttributeSet(),
312 hCells * vCells * 4 + (hCells + vCells - 1) * 4,
313 hCells * vCells * 6 + (hCells + vCells) * 12,
314 indexType);
315 } else {
316 geometry->allocate(hCells * vCells * 4 + (hCells + vCells - 1) * 4,
317 hCells * vCells * 6 + (hCells + vCells) * 12);
318 }
320 Q_ASSERT(g);
321
322 g->setDrawingMode(QSGGeometry::DrawTriangles);
323 auto *vertices = reinterpret_cast<SmoothImageVertex *>(g->vertexData());
324 memset(vertices, 0, g->vertexCount() * g->sizeOfVertex());
325 void *indexData = g->indexData();
326
327 // The deltas are how much the fuzziness can reach into the image.
328 // Only the border vertices are moved by the vertex shader, so the fuzziness
329 // can't reach further into the image than the closest interior vertices.
330 float leftDx = xData.at(1).x - xData.at(0).x;
331 float rightDx = xData.at(xData.size() - 1).x - xData.at(xData.size() - 2).x;
332 float topDy = yData.at(1).y - yData.at(0).y;
333 float bottomDy = yData.at(yData.size() - 1).y - yData.at(yData.size() - 2).y;
334
335 float leftDu = xData.at(1).tx - xData.at(0).tx;
336 float rightDu = xData.at(xData.size() - 1).tx - xData.at(xData.size() - 2).tx;
337 float topDv = yData.at(1).ty - yData.at(0).ty;
338 float bottomDv = yData.at(yData.size() - 1).ty - yData.at(yData.size() - 2).ty;
339
340 if (hCells == 1) {
341 leftDx = rightDx *= 0.5f;
342 leftDu = rightDu *= 0.5f;
343 }
344 if (vCells == 1) {
345 topDy = bottomDy *= 0.5f;
346 topDv = bottomDv *= 0.5f;
347 }
348
349 // This delta is how much the fuzziness can reach out from the image.
350 float delta = float(qAbs(targetRect.width()) < qAbs(targetRect.height())
351 ? targetRect.width() : targetRect.height()) * 0.5f;
352
353 int index = 0;
354 ys = yData.data();
355 for (int j = 0; j < vCells; ++j, ys += 2) {
356 xs = xData.data();
357 bool isTop = j == 0;
358 bool isBottom = j == vCells - 1;
359 for (int i = 0; i < hCells; ++i, xs += 2) {
360 bool isLeft = i == 0;
361 bool isRight = i == hCells - 1;
362
363 SmoothImageVertex *v = vertices + index;
364
365 int topLeft = index;
366 for (int k = (isTop || isLeft ? 2 : 1); k--; ++v, ++index) {
367 v->x = xs[0].x;
368 v->u = xs[0].tx;
369 v->y = ys[0].y;
370 v->v = ys[0].ty;
371 }
372
373 int topRight = index;
374 for (int k = (isTop || isRight ? 2 : 1); k--; ++v, ++index) {
375 v->x = xs[1].x;
376 v->u = xs[1].tx;
377 v->y = ys[0].y;
378 v->v = ys[0].ty;
379 }
380
381 int bottomLeft = index;
382 for (int k = (isBottom || isLeft ? 2 : 1); k--; ++v, ++index) {
383 v->x = xs[0].x;
384 v->u = xs[0].tx;
385 v->y = ys[1].y;
386 v->v = ys[1].ty;
387 }
388
389 int bottomRight = index;
390 for (int k = (isBottom || isRight ? 2 : 1); k--; ++v, ++index) {
391 v->x = xs[1].x;
392 v->u = xs[1].tx;
393 v->y = ys[1].y;
394 v->v = ys[1].ty;
395 }
396
397 appendQuad(g->indexType(), &indexData, topLeft, topRight, bottomLeft, bottomRight);
398
399 if (isTop) {
400 vertices[topLeft].dy = vertices[topRight].dy = topDy;
401 vertices[topLeft].dv = vertices[topRight].dv = topDv;
402 vertices[topLeft + 1].dy = vertices[topRight + 1].dy = -delta;
403 appendQuad(g->indexType(), &indexData, topLeft + 1, topRight + 1, topLeft, topRight);
404 }
405
406 if (isBottom) {
407 vertices[bottomLeft].dy = vertices[bottomRight].dy = -bottomDy;
408 vertices[bottomLeft].dv = vertices[bottomRight].dv = -bottomDv;
409 vertices[bottomLeft + 1].dy = vertices[bottomRight + 1].dy = delta;
410 appendQuad(g->indexType(), &indexData, bottomLeft, bottomRight, bottomLeft + 1, bottomRight + 1);
411 }
412
413 if (isLeft) {
414 vertices[topLeft].dx = vertices[bottomLeft].dx = leftDx;
415 vertices[topLeft].du = vertices[bottomLeft].du = leftDu;
416 vertices[topLeft + 1].dx = vertices[bottomLeft + 1].dx = -delta;
417 appendQuad(g->indexType(), &indexData, topLeft + 1, topLeft, bottomLeft + 1, bottomLeft);
418 }
419
420 if (isRight) {
421 vertices[topRight].dx = vertices[bottomRight].dx = -rightDx;
422 vertices[topRight].du = vertices[bottomRight].du = -rightDu;
423 vertices[topRight + 1].dx = vertices[bottomRight + 1].dx = delta;
424 appendQuad(g->indexType(), &indexData, topRight, topRight + 1, bottomRight, bottomRight + 1);
425 }
426 }
427 }
428
429 Q_ASSERT(index == g->vertexCount());
430 } else {
431 if (!geometry || geometry->indexType() != indexType) {
433 hCells * vCells * 4, hCells * vCells * 6,
434 indexType);
435 } else {
436 geometry->allocate(hCells * vCells * 4, hCells * vCells * 6);
437 }
440 ys = yData.data();
441 for (int j = 0; j < vCells; ++j, ys += 2) {
442 xs = xData.data();
443 for (int i = 0; i < hCells; ++i, xs += 2) {
444 vertices[0].x = vertices[2].x = xs[0].x;
445 vertices[0].tx = vertices[2].tx = xs[0].tx;
446 vertices[1].x = vertices[3].x = xs[1].x;
447 vertices[1].tx = vertices[3].tx = xs[1].tx;
448
449 vertices[0].y = vertices[1].y = ys[0].y;
450 vertices[0].ty = vertices[1].ty = ys[0].ty;
451 vertices[2].y = vertices[3].y = ys[1].y;
452 vertices[2].ty = vertices[3].ty = ys[1].ty;
453
454 vertices += 4;
455 }
456 }
457 void *indexData = geometry->indexData();
458 for (int i = 0; i < 4 * vCells * hCells; i += 4)
459 appendQuad(geometry->indexType(), &indexData, i, i + 1, i + 2, i + 3);
460 }
461 return geometry;
462}
463
465{
467 const QSGTexture *t = materialTexture();
468 if (!t) {
470 g->allocate(4);
471 g->setDrawingMode(QSGGeometry::DrawTriangleStrip);
472 memset(g->vertexData(), 0, g->sizeOfVertex() * 4);
473 } else {
474 QRectF sourceRect = t->normalizedTextureSubRect();
475
476 QRectF innerSourceRect(sourceRect.x() + m_innerSourceRect.x() * sourceRect.width(),
477 sourceRect.y() + m_innerSourceRect.y() * sourceRect.height(),
478 m_innerSourceRect.width() * sourceRect.width(),
479 m_innerSourceRect.height() * sourceRect.height());
480
481 bool hasMargins = m_targetRect != m_innerTargetRect;
482
483 int floorLeft = qFloor(m_subSourceRect.left());
484 int ceilRight = qCeil(m_subSourceRect.right());
485 int floorTop = qFloor(m_subSourceRect.top());
486 int ceilBottom = qCeil(m_subSourceRect.bottom());
487 int hTiles = ceilRight - floorLeft;
488 int vTiles = ceilBottom - floorTop;
489
490 bool hasTiles = hTiles > 1 || vTiles > 1;
491 bool fullTexture = innerSourceRect == QRectF(0, 0, 1, 1);
492
493 // An image can be rendered as a single quad if:
494 // - There are no margins, and either:
495 // - the image isn't repeated
496 // - the source rectangle fills the entire texture so that texture wrapping can be used,
497 // and NPOT is supported
498 if (!hasMargins && (!hasTiles || (fullTexture && supportsWrap(t->textureSize())))) {
499 QRectF sr;
500 if (!fullTexture) {
501 sr = QRectF(innerSourceRect.x() + (m_subSourceRect.left() - floorLeft) * innerSourceRect.width(),
502 innerSourceRect.y() + (m_subSourceRect.top() - floorTop) * innerSourceRect.height(),
503 m_subSourceRect.width() * innerSourceRect.width(),
504 m_subSourceRect.height() * innerSourceRect.height());
505 } else {
506 sr = QRectF(m_subSourceRect.left() - floorLeft, m_subSourceRect.top() - floorTop,
508 }
510 qreal oldLeft = sr.left();
511 sr.setLeft(sr.right());
512 sr.setRight(oldLeft);
513 }
514 if (m_mirrorVertically) {
515 qreal oldTop = sr.top();
516 sr.setTop(sr.bottom());
517 sr.setBottom(oldTop);
518 }
519
520 if (m_antialiasing) {
522 Q_ASSERT(g != &m_geometry);
523 if (g->indexType() != QSGGeometry::UnsignedShortType) {
524 setGeometry(new QSGGeometry(smoothImageAttributeSet(), 0));
525 g = geometry();
526 }
527 g->allocate(8, 14);
528 g->setDrawingMode(QSGGeometry::DrawTriangleStrip);
529 auto *vertices = reinterpret_cast<SmoothImageVertex *>(g->vertexData());
530 float delta = float(qAbs(m_targetRect.width()) < qAbs(m_targetRect.height())
531 ? m_targetRect.width() : m_targetRect.height()) * 0.5f;
532 float sx = float(sr.width() / m_targetRect.width());
533 float sy = float(sr.height() / m_targetRect.height());
534 for (int d = -1; d <= 1; d += 2) {
535 for (int j = 0; j < 2; ++j) {
536 for (int i = 0; i < 2; ++i, ++vertices) {
537 vertices->x = m_targetRect.x() + i * m_targetRect.width();
538 vertices->y = m_targetRect.y() + j * m_targetRect.height();
539 vertices->u = sr.x() + i * sr.width();
540 vertices->v = sr.y() + j * sr.height();
541 vertices->dx = (i == 0 ? delta : -delta) * d;
542 vertices->dy = (j == 0 ? delta : -delta) * d;
543 vertices->du = (d < 0 ? 0 : vertices->dx * sx);
544 vertices->dv = (d < 0 ? 0 : vertices->dy * sy);
545 }
546 }
547 }
548 Q_ASSERT(vertices - g->vertexCount() == g->vertexData());
549 static const quint16 indices[] = {
550 0, 4, 1, 5, 3, 7, 2, 6, 0, 4,
551 4, 6, 5, 7
552 };
553 Q_ASSERT(g->sizeOfIndex() * g->indexCount() == sizeof(indices));
554 memcpy(g->indexDataAsUShort(), indices, sizeof(indices));
555 } else {
559 }
560 } else {
563 sourceRect, innerSourceRect, m_subSourceRect,
565 if (g != geometry()) {
566 setGeometry(g);
567 setFlag(OwnsGeometry, true);
568 }
569 }
570 }
572 m_dirtyGeometry = false;
573}
574
\inmodule QtCore\reentrant
Definition qrect.h:484
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
Definition qrect.h:661
constexpr qreal bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
Definition qrect.h:500
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:672
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:732
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:729
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:669
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:497
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:498
constexpr qreal right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
Definition qrect.h:499
const QSGGeometry * geometry() const
Returns this node's geometry.
Definition qsgnode.h:160
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
Definition qsgnode.cpp:764
virtual bool supportsWrap(const QSize &size) const =0
void setTexture(QSGTexture *texture) override
void setInnerSourceRect(const QRectF &rect) override
void setMirror(bool mirrorHorizontally, bool mirrorVertically) override
void setInnerTargetRect(const QRectF &rect) override
virtual void setMaterialTexture(QSGTexture *texture)=0
void setAntialiasing(bool antialiasing) override
virtual void updateMaterialAntialiasing()=0
void setTargetRect(const QRectF &rect) override
void setSubSourceRect(const QRectF &rect) override
virtual QSGTexture * materialTexture() const =0
virtual bool updateMaterialBlending()=0
void preprocess() override
Override this function to do processing on the node before it is rendered.
The QSGDynamicTexture class serves as a baseclass for dynamically changing textures,...
Definition qsgtexture.h:100
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
Definition qsggeometry.h:15
void setDrawingMode(unsigned int mode)
Sets the mode to be used for drawing this geometry.
TexturedPoint2D * vertexDataAsTexturedPoint2D()
Convenience function to access the vertex data as a mutable array of QSGGeometry::TexturedPoint2D.
static const AttributeSet & defaultAttributes_TexturedPoint2D()
Convenience function which returns attributes to be used for textured 2D drawing.
static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect, const QRectF &sourceRect)
Updates the geometry g with the coordinates in rect and texture coordinates from textureRect.
void * indexData()
Returns a pointer to the raw index data of this geometry object.
int indexType() const
Returns the primitive type used for indices in this geometry object.
void allocate(int vertexCount, int indexCount=0)
Resizes the vertex and index data of this geometry object to fit vertexCount vertices and indexCount ...
Type
Specifies the component type in the vertex data.
Definition qsggeometry.h:43
@ DirtyMaterial
Definition qsgnode.h:75
@ DirtyGeometry
Definition qsgnode.h:74
@ OwnsGeometry
Definition qsgnode.h:57
void markDirty(DirtyState bits)
Notifies all connected renderers that the node has dirty bits.
Definition qsgnode.cpp:624
void setFlag(Flag, bool=true)
Sets the flag f on this node if enabled is true; otherwise clears the flag.
Definition qsgnode.cpp:586
\inmodule QtQuick
Definition qsgtexture.h:20
virtual QSize textureSize() const =0
Returns the size of the texture in pixels.
rect
[4]
Combined button and popup list for selecting options.
const QSGGeometry::AttributeSet & smoothImageAttributeSet()
static struct AttrInfo attrs[]
int qFloor(T v)
Definition qmath.h:42
int qCeil(T v)
Definition qmath.h:36
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint index
[2]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint texture
GLboolean GLboolean g
GLsizei GLenum const void * indices
GLint y
GLdouble GLdouble t
Definition qopenglext.h:243
GLbyte ty
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
static void appendQuad(int indexType, void **indexData, int topLeft, int topRight, int bottomLeft, int bottomRight)
void qsgnode_set_description(QSGNode *node, const QString &description)
Definition qsgnode.cpp:641
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
QT_BEGIN_NAMESPACE constexpr void qSwap(T &value1, T &value2) noexcept(std::is_nothrow_swappable_v< T >)
Definition qswap.h:20
unsigned int quint32
Definition qtypes.h:50
unsigned short quint16
Definition qtypes.h:48
double qreal
Definition qtypes.h:187
QObject::connect nullptr
The QSGGeometry::AttributeSet describes how the vertices in a QSGGeometry are built up.
Definition qsggeometry.h:73
The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry.
Definition qsggeometry.h:58
static Attribute createWithAttributeType(int pos, int tupleSize, int primitiveType, AttributeType attributeType)
Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.
The QSGGeometry::TexturedPoint2D struct is a convenience struct for accessing 2D Points with texture ...
Definition qsggeometry.h:85