Go to the documentation of this file. 1 #ifndef MYTHPAINTER_OPENGL_H_
2 #define MYTHPAINTER_OPENGL_H_
10 #if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
11 #include <QRecursiveMutex>
23 class QOpenGLFramebufferObject;
24 class QOpenGLShaderProgram;
36 void DeleteTextures(
void);
38 QString
GetName(
void)
override {
return {
"OpenGL"}; }
43 void Begin(QPaintDevice *Parent)
override;
48 void DrawRect(QRect Area,
const QBrush &FillBrush,
49 const QPen &LinePen,
int Alpha)
override;
51 const QBrush &FillBrush,
const QPen &LinePen,
int Alpha)
override;
56 void ClearCache(
void);
58 QOpenGLShaderProgram* GetProceduralShader(
const ProcSource& VertexSource,
const ProcSource& FragmentSource,
const QString& SourceHash);
66 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
67 QMutex m_imageAndTextureLock { QMutex::Recursive };
76 std::array<QOpenGLBuffer*,MAX_BUFFER_POOL> m_mappedBufferPool {
nullptr };
77 size_t m_mappedBufferPoolIdx { 0 };
78 bool m_mappedBufferPoolReady {
false };
std::list< MythImage * > m_imageExpireList
bool SupportsAlpha(void) override
virtual void DrawProcedural(QRect, int, const ProcSource &, const ProcSource &, const QString &)
MythImage * GetFormatImagePriv(void) override
Creates a reference counted image, call DecrRef() to delete.
QRecursiveMutex m_imageAndTextureLock
static constexpr size_t MAX_BUFFER_POOL
virtual void DrawRect(QRect area, const QBrush &fillBrush, const QPen &linePen, int alpha)
bool SupportsAnimation(void) override
virtual void PushTransformation(const UIEffects &zoom, QPointF center=QPointF())
virtual void DeleteFormatImagePriv(MythImage *im)=0
bool SupportsClipping(void) override
virtual void DrawImage(QRect dest, MythImage *im, QRect src, int alpha)=0
virtual void FreeResources(void)
QHash< QString, QOpenGLShaderProgram * > m_procedurals
std::shared_ptr< QByteArray > ProcSource
QString GetName(void) override
QVector< MythGLTexture * > m_mappedTextures
virtual void PopTransformation(void)
virtual void Begin(QPaintDevice *)
virtual void DrawRoundRect(QRect area, int cornerRadius, const QBrush &fillBrush, const QPen &linePen, int alpha)
QMap< MythImage *, MythGLTexture * > m_imageToTextureMap
std::list< MythGLTexture * > m_textureDeleteList