8#if __has_include(<QtQuick/private/qsgplaintexture_p.h>)
9#include <QtQuick/private/qsgplaintexture_p.h>
12#include <QtGui/QOpenGLContext>
13#include <QtGui/QOpenGLFunctions>
35 const QSize fbSize = minSize * pixelRatio;
36 m_map->resize(minSize);
39 m_map->setFramebufferObject(m_fbo->handle(), fbSize);
47 fboTexture->setTextureId(m_fbo->texture());
62 f->glViewport(0, 0, m_fbo->width(), m_fbo->height());
65 f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &
alignment);
69 f->glClearColor(0.f, 0.f, 0.f, 0.f);
70 f->glColorMask(
true,
true,
true,
true);
71 f->glClear(GL_COLOR_BUFFER_BIT);
77 f->glPixelStorei(GL_UNPACK_ALIGNMENT,
alignment);
79 window->resetOpenGLState();
93 m_map.reset(
new QMapboxGL(
nullptr,
settings,
size, pixelRatio));
109 f->glScissor(
state->scissorRect().x(),
state->scissorRect().y(),
state->scissorRect().width(),
state->scissorRect().height());
110 f->glEnable(GL_SCISSOR_TEST);
113 f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &
alignment);
118 f->glPixelStorei(GL_UNPACK_ALIGNMENT,
alignment);
void copyrightsChanged(const QString ©rightsHtml)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static QOpenGLContext * currentContext()
Returns the last context which called makeCurrent in the current thread, or \nullptr,...
QOpenGLFunctions * functions() const
Get the QOpenGLFunctions instance for this context.
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer object.
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
Convenience function that calls glViewport(x, y, width, height).
\inmodule QtCore\reentrant
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
StateFlags changedStates() const override
When the underlying rendering API is OpenGL, this function should return a mask where each bit repres...
void render(const RenderState *state) override
This function is called by the renderer and should paint this node with directly invoking commands in...
QSGMapboxGLRenderNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap)
void render(QQuickWindow *)
QSGMapboxGLTextureNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap)
void resize(const QSize &size, qreal pixelRatio)
void markDirty(DirtyState bits)
Notifies all connected renderers that the node has dirty bits.
void setTextureSize(const QSize &size)
void setHasAlphaChannel(bool alpha)
The QSGRenderNode class represents a set of custom rendering commands targeting the graphics API that...
The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the ...
void setTextureCoordinatesTransform(TextureCoordinatesTransformMode mode)
Sets the method used to generate texture coordinates to mode.
void setRect(const QRectF &rect)
Sets the target rect of this texture node to r.
void setFiltering(QSGTexture::Filtering filtering)
Sets the filtering to be used for this texture node to filtering.
void setTexture(QSGTexture *texture)
Sets the texture of this texture node to texture.
QSGTexture * texture() const
Returns the texture for this texture node.
void setOwnsTexture(bool owns)
Sets whether the node takes ownership of the texture to owns.
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
\macro QT_RESTRICTED_CAST_FROM_ASCII
typedef GLint(GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC)(GLuint program
GLenum GLuint GLintptr GLsizeiptr size
[1]
static const QSize minTextureSize
QSettings settings("MySoft", "Star Runner")
[0]