kodi
xbmc
guilib
GUITextureGLES.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
14
#include <array>
15
#include <vector>
16
17
#include "system_gl.h"
18
19
struct
PackedVertex
20
{
21
float
x, y, z;
22
float
u1, v1;
23
float
u2, v2;
24
};
25
typedef
std::vector<PackedVertex> PackedVertices;
26
27
class
CRenderSystemGLES
;
28
29
class
CGUITextureGLES
:
public
CGUITexture
30
{
31
public
:
32
static
void
Register();
33
static
CGUITexture
* CreateTexture(
34
float
posX,
float
posY,
float
width,
float
height,
const
CTextureInfo
& texture);
35
36
static
void
DrawQuad(
const
CRect
& coords,
37
UTILS::COLOR::Color color,
38
CTexture
* texture =
nullptr
,
39
const
CRect
* texCoords =
nullptr
);
40
41
CGUITextureGLES
(
float
posX,
float
posY,
float
width,
float
height,
const
CTextureInfo
& texture);
42
~
CGUITextureGLES
()
override
=
default
;
43
44
CGUITextureGLES
* Clone()
const override
;
45
46
protected
:
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
;
49
void
End()
override
;
50
51
private
:
52
CGUITextureGLES
(
const
CGUITextureGLES
& texture) =
default
;
53
54
std::array<GLubyte, 4> m_col;
55
56
PackedVertices m_packedVertices;
57
std::vector<GLushort> m_idx;
58
CRenderSystemGLES
*m_renderSystem;
59
};
60
CRectGen< float >
CGUITextureGLES
Definition:
GUITextureGLES.h:29
CRenderSystemGLES
Definition:
RenderSystemGLES.h:73
CTexture
Base texture class, subclasses of which depend on the render spec (DX, GL etc.)
Definition:
Texture.h:34
CTextureInfo
Definition:
GUITexture.h:51
CGUITexture
Definition:
GUITexture.h:73
PackedVertex
Definition:
GUITextureGLES.h:19
Generated by
1.8.13