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"
17 #include "system_gl.h"
25 typedef std::vector
<PackedVertex
> PackedVertices
;
27 class CRenderSystemGLES
;
29 class CGUITextureGLES
: public CGUITexture
32 static void Register();
33 static CGUITexture
* CreateTexture(
34 float posX
, float posY
, float width
, float height
, const CTextureInfo
& texture
);
36 static void DrawQuad(const CRect
& coords
,
37 UTILS::COLOR::Color color
,
38 CTexture
* texture
= nullptr,
39 const CRect
* texCoords
= nullptr);
41 CGUITextureGLES(float posX
, float posY
, float width
, float height
, const CTextureInfo
& texture
);
42 ~CGUITextureGLES() override
= default;
44 CGUITextureGLES
* Clone() const override
;
47 void Begin(UTILS::COLOR::Color color
) override
;
48 void Draw(float* x
, float* y
, float* z
, const CRect
& texture
, const CRect
& diffuse
, int orientation
) override
;
52 CGUITextureGLES(const CGUITextureGLES
& texture
) = default;
54 std::array
<GLubyte
, 4> m_col
;
56 PackedVertices m_packedVertices
;
57 std::vector
<GLushort
> m_idx
;
58 CRenderSystemGLES
*m_renderSystem
;