50 , m_clear_color(
Qt::transparent)
83 if (
d->m_root_node == node)
86 d->m_root_node->m_renderers.removeOne(
this);
89 d->m_root_node = node;
91 Q_ASSERT(!
d->m_root_node->m_renderers.contains(
this));
92 d->m_root_node->m_renderers <<
this;
105 return d->m_root_node;
126 d->m_device_rect =
rect;
137 return d->m_device_rect;
159 d->m_viewport_rect =
rect;
170 return d->m_viewport_rect;
238 if (nativeNDCFlipY) {
257 if (
d->m_projection_matrix.count() <=
index)
258 d->m_projection_matrix.resize(
index + 1);
268 if (
d->m_projection_matrix_native_ndc.count() <=
index)
269 d->m_projection_matrix_native_ndc.resize(
index + 1);
281 return d->m_projection_matrix[
index];
287 return d->m_projection_matrix.count();
293 return d->m_projection_matrix_native_ndc.count();
302 return d->m_projection_matrix_native_ndc[
index];
325 return d->m_clear_color;
343#include "moc_qsgabstractrenderer_p.cpp"
The QColor class provides colors based on RGB, HSV or CMYK values.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void ortho(const QRect &rect)
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QSGAbstractRendererPrivate()
QVarLengthArray< QMatrix4x4, 1 > m_projection_matrix_native_ndc
QVarLengthArray< QMatrix4x4, 1 > m_projection_matrix
QSGAbstractRenderer gives access to the scene graph nodes and rendering.
QRect deviceRect() const
Returns the device rect of the surface being rendered to.
void setProjectionMatrix(const QMatrix4x4 &matrix, int index=0)
Use matrix to project the QSGNode coordinates onto surface pixels.
QRect viewportRect() const
Returns the rect of the viewport to render.
void setViewportRect(const QRect &rect)
Sets rect as the geometry of the viewport to render on the surface.
virtual void prepareSceneInline()
QSGRootNode * rootNode() const
Returns the root of the QSGNode scene.
QMatrix4x4 projectionMatrixWithNativeNDC(int index) const
void setProjectionMatrixToRect(const QRectF &rect)
Convenience method that calls setProjectionMatrix() with an orthographic matrix generated from rect.
void setDeviceRect(const QRect &rect)
Sets rect as the geometry of the surface being rendered to.
virtual void renderSceneInline()
~QSGAbstractRenderer() override
void setClearColor(const QColor &color)
Sets the color to clear the framebuffer.
QSGAbstractRenderer(QObject *parent=nullptr)
int projectionMatrixWithNativeNDCCount() const
void setProjectionMatrixWithNativeNDC(const QMatrix4x4 &matrix, int index=0)
int projectionMatrixCount() const
QMatrix4x4 projectionMatrix(int index) const
Returns the projection matrix.
QColor clearColor() const
Returns the color that clears the framebuffer at the beginning of the rendering.
void setRootNode(QSGRootNode *node)
Sets the node as the root of the QSGNode scene that you want to render.
virtual void nodeChanged(QSGNode *node, QSGNode::DirtyState state)=0
The QSGRootNode is the toplevel root of any scene graph.
void resize(qsizetype sz)
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble top