kodi
GUIRenderTarget.h
1 /*
2  * Copyright (C) 2017-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 namespace KODI
12 {
13 namespace RETRO
14 {
15 class CGameWindowFullScreen;
16 class CGUIGameControl;
17 class IRenderManager;
18 
19 // --- CGUIRenderTarget ------------------------------------------------------
20 
28 {
29 public:
30  CGUIRenderTarget(IRenderManager* renderManager);
31 
32  virtual ~CGUIRenderTarget() = default;
33 
37  virtual void Render() = 0;
38 
42  virtual void RenderEx() = 0;
43 
47  virtual void ClearBackground() {}
48 
52  virtual bool IsDirty() { return true; }
53 
54 protected:
55  // Construction parameters
57 };
58 
59 // --- CGUIRenderControl -----------------------------------------------------
60 
62 {
63 public:
64  CGUIRenderControl(IRenderManager* renderManager, CGUIGameControl& gameControl);
65  ~CGUIRenderControl() override = default;
66 
67  // implementation of CGUIRenderTarget
68  void Render() override;
69  void RenderEx() override;
70 
71 private:
72  // Construction parameters
73  CGUIGameControl& m_gameControl;
74 };
75 
76 // --- CGUIRenderFullScreen --------------------------------------------------
77 
79 {
80 public:
82  ~CGUIRenderFullScreen() override = default;
83 
84  // implementation of CGUIRenderTarget
85  void Render() override;
86  void RenderEx() override;
87  void ClearBackground() override;
88 
89 private:
90  // Construction parameters
91  CGameWindowFullScreen& m_window;
92 };
93 } // namespace RETRO
94 } // namespace KODI
Definition: GUIGameControl.h:29
IRenderManager *const m_renderManager
Definition: GUIRenderTarget.h:56
virtual void Render()=0
Draw the frame to the rendering area.
A target of rendering commands.
Definition: GUIRenderTarget.h:27
virtual void ClearBackground()
Clear the background of the rendering area.
Definition: GUIRenderTarget.h:47
Definition: AudioDecoder.h:18
virtual bool IsDirty()
Check of the rendering area is dirty.
Definition: GUIRenderTarget.h:52
Definition: GameWindowFullScreen.h:22
Interface to expose rendering functions to GUI components.
Definition: IRenderManager.h:24
Definition: GUIRenderTarget.h:61
virtual void RenderEx()=0
Draw the frame to the rendering area differently somehow.
Definition: GUIRenderTarget.h:78