2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "GUITexture.h"
12 #include "utils/ColorUtils.h"
16 #include "system_gl.h"
18 class CRenderSystemGL
;
20 class CGUITextureGL
: public CGUITexture
23 static void Register();
24 static CGUITexture
* CreateTexture(
25 float posX
, float posY
, float width
, float height
, const CTextureInfo
& texture
);
27 static void DrawQuad(const CRect
& coords
,
28 UTILS::COLOR::Color color
,
29 CTexture
* texture
= nullptr,
30 const CRect
* texCoords
= nullptr);
32 CGUITextureGL(float posX
, float posY
, float width
, float height
, const CTextureInfo
& texture
);
33 ~CGUITextureGL() override
= default;
35 CGUITextureGL
* Clone() const override
;
38 void Begin(UTILS::COLOR::Color color
) override
;
39 void Draw(float *x
, float *y
, float *z
, const CRect
&texture
, const CRect
&diffuse
, int orientation
) override
;
43 CGUITextureGL(const CGUITextureGL
& texture
) = default;
45 std::array
<GLubyte
, 4> m_col
;
54 std::vector
<PackedVertex
> m_packedVertices
;
55 std::vector
<GLushort
> m_idx
;
56 CRenderSystemGL
*m_renderSystem
;