kodi
OverlayRendererGL.h
1 /*
2  * Initial code sponsored by: Voddler Inc (voddler.com)
3  * Copyright (C) 2005-2018 Team Kodi
4  * This file is part of Kodi - https://kodi.tv
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  * See LICENSES/README.md for more information.
8  */
9 
10 #pragma once
11 
12 #include "OverlayRenderer.h"
13 
14 #include "system_gl.h"
15 
16 class CDVDOverlay;
17 class CDVDOverlayImage;
18 class CDVDOverlaySpu;
19 class CDVDOverlaySSA;
20 
21 namespace OVERLAY {
22 
23  class COverlayTextureGL : public COverlay
24  {
25  public:
30  explicit COverlayTextureGL(const CDVDOverlayImage& o, CRect& rSource);
31  explicit COverlayTextureGL(const CDVDOverlaySpu& o);
32  ~COverlayTextureGL() override;
33 
34  void Render(SRenderState& state) override;
35 
36  GLuint m_texture = 0;
37  float m_u;
38  float m_v;
39  bool m_pma; /*< is alpha in texture premultiplied in the values */
40  };
41 
42  class COverlayGlyphGL : public COverlay
43  {
44  public:
45  COverlayGlyphGL(ASS_Image* images, float width, float height);
46 
47  ~COverlayGlyphGL() override;
48 
49  void Render(SRenderState& state) override;
50 
51  struct VERTEX
52  {
53  GLfloat u, v;
54  GLubyte r, g, b, a;
55  GLfloat x, y, z;
56  };
57 
58  std::vector<VERTEX> m_vertex;
59 
60  GLuint m_texture = 0;
61  float m_u;
62  float m_v;
63  };
64 
65 }
Definition: DVDOverlaySSA.h:16
Definition: OverlayRendererGL.h:23
Definition: OverlayRenderer.h:43
Definition: OverlayRendererGL.h:42
Definition: OverlayRenderer.h:33
Definition: DVDOverlayImage.h:18
COverlayTextureGL(const CDVDOverlayImage &o, CRect &rSource)
Create the overlay for rendering.
Definition: OverlayRendererGL.cpp:86
Definition: OverlayRenderer.h:35
Definition: OverlayRendererGL.h:51
Definition: DVDOverlaySpu.h:16
Definition: DVDOverlay.h:27