Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qopenglpaintdevice_p.h
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// Qt-Security score:significant reason:default
4
5#ifndef QOPENGL_PAINTDEVICE_P_H
6#define QOPENGL_PAINTDEVICE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the Qt OpenGL classes. This header file may change from
14// version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <qopenglpaintdevice.h>
20#include <private/qglobal_p.h>
21
23
24class QOpenGLContext;
25class QPaintEngine;
26
27class Q_OPENGL_EXPORT QOpenGLPaintDevicePrivate
28{
29public:
30 QOpenGLPaintDevicePrivate(const QSize &size);
31 virtual ~QOpenGLPaintDevicePrivate();
32
33 static QOpenGLPaintDevicePrivate *get(QOpenGLPaintDevice *dev) { return dev->d_func(); }
34
35 virtual void beginPaint() { }
36 virtual void endPaint() { }
37
38public:
39 QSize size;
40 QOpenGLContext *ctx;
41
42 qreal dpmx;
43 qreal dpmy;
44 qreal devicePixelRatio;
45
46 bool flipped;
47
48 QPaintEngine *engine;
49};
50
51QT_END_NAMESPACE
52
53#endif // QOPENGL_PAINTDEVICE_P_H
void updateTexture(GLenum textureUnit, const T &texture, GLenum wrapMode, GLenum filterMode, TextureUpdateMode updateMode=UpdateIfNeeded)
void transferMode(EngineMode newMode)
void composite(const QOpenGLRect &boundingRect)
bool prepareForCachedGlyphDraw(const QFontEngineGlyphCache &cache)
void stroke(const QVectorPath &path, const QPen &pen)
GLuint bindTexture(const ImageWithBindOptions &imageWithOptions, bool *newTextureCreated)
void activateTextureUnit(GLenum textureUnit)
void setVertexAttribArrayEnabled(int arrayIndex, bool enabled=true)
void fill(const QVectorPath &path)
void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, QPainter::PixmapFragmentHints hints)
bool prepareForDraw(bool srcPixelsAreOpaque)
void drawCachedGlyphs(QFontEngine::GlyphFormat glyphFormat, QStaticTextItem *staticTextItem)
void fillStencilWithVertexArray(const float *data, int count, int *stops, int stopCount, const QOpenGLRect &bounds, StencilFillMode mode)
void setBrush(const QBrush &brush)
void drawVertexArrays(const float *data, int *stops, int stopCount, GLenum primitive)
GLuint bindTexture(const GLuint &textureId, bool *newTextureCreated)
void setScissor(const QRect &rect)
bool vertexAttributeArraysEnabledState[QT_GL_VERTEX_ARRAY_TRACKED_COUNT]
QOpenGL2PaintEngineState(const QOpenGL2PaintEngineState &other)
friend class QPaintEngine
Definition qpainter.h:438
Combined button and popup list for selecting options.
#define GL_EXCLUSION_KHR
#define GL_BLEND_ADVANCED_COHERENT_KHR
#define GL_DIFFERENCE_KHR
#define GL_COLORDODGE_KHR
#define GL_HARDLIGHT_KHR
#define GL_SCREEN_KHR
#define GL_LIGHTEN_KHR
#define GL_SOFTLIGHT_KHR
#define GL_DARKEN_KHR
#define GL_MULTIPLY_KHR
#define GL_OVERLAY_KHR
#define GL_COLORBURN_KHR
static void setCoords(GLfloat *coords, const QOpenGLRect &rect)
static bool isPowerOfTwo(int x)
static const QRectF scaleRect(const QRectF &r, qreal sx, qreal sy)
QColor qt_premultiplyColor(QColor c, GLfloat opacity)
#define QT_GL_VERTEX_ARRAY_TRACKED_COUNT
#define QT_UNKNOWN_TEXTURE_UNIT
#define QT_MASK_TEXTURE_UNIT
#define QT_IMAGE_TEXTURE_UNIT
#define QT_DEFAULT_TEXTURE_UNIT
#define QT_BRUSH_TEXTURE_UNIT
#define GL_STENCIL_HIGH_BIT
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
QOpenGLTextureUploader::BindOptions options