kodi
GUITextureD3D.h
1 /*
2  * Copyright (C) 2005-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 #include "GUITexture.h"
12 #include "utils/ColorUtils.h"
13 
15 {
16 public:
17  static void Register();
18  static CGUITexture* CreateTexture(
19  float posX, float posY, float width, float height, const CTextureInfo& texture);
20 
21  static void DrawQuad(const CRect& coords,
22  UTILS::COLOR::Color color,
23  CTexture* texture = nullptr,
24  const CRect* texCoords = nullptr);
25 
26  CGUITextureD3D(float posX, float posY, float width, float height, const CTextureInfo& texture);
27  ~CGUITextureD3D() override = default;
28 
29  CGUITextureD3D* Clone() const override;
30 
31 protected:
32  void Begin(UTILS::COLOR::Color color);
33  void Draw(float *x, float *y, float *z, const CRect &texture, const CRect &diffuse, int orientation);
34  void End();
35 
36 private:
37  CGUITextureD3D(const CGUITextureD3D& texture) = default;
38 
39  UTILS::COLOR::Color m_col;
40 };
41 
void Begin(UTILS::COLOR::Color color)
called after our textures have been freed
Definition: GUITextureD3D.cpp:42
Definition: GUITextureD3D.h:14
Base texture class, subclasses of which depend on the render spec (DX, GL etc.)
Definition: Texture.h:34
Definition: GUITexture.h:51
Definition: GUITexture.h:73