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
4#ifndef QOPENGL_PAINTDEVICE_P_H
5#define QOPENGL_PAINTDEVICE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the Qt OpenGL classes. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qopenglpaintdevice.h>
19#include <private/qglobal_p.h>
20
22
23class QOpenGLContext;
24class QPaintEngine;
25
26class Q_OPENGL_EXPORT QOpenGLPaintDevicePrivate
27{
28public:
29 QOpenGLPaintDevicePrivate(const QSize &size);
30 virtual ~QOpenGLPaintDevicePrivate();
31
32 static QOpenGLPaintDevicePrivate *get(QOpenGLPaintDevice *dev) { return dev->d_func(); }
33
34 virtual void beginPaint() { }
35 virtual void endPaint() { }
36
37public:
38 QSize size;
39 QOpenGLContext *ctx;
40
41 qreal dpmx;
42 qreal dpmy;
43 qreal devicePixelRatio;
44
45 bool flipped;
46
47 QPaintEngine *engine;
48};
49
50QT_END_NAMESPACE
51
52#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:437
#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