Fix keymap.
[vuplus_xbmc] / xbmc / guilib / GUITextureGLES.h
1 /*!
2 \file GUITextureGLES.h
3 \brief
4 */
5
6 #ifndef GUILIB_GUITEXTUREGLES_H
7 #define GUILIB_GUITEXTUREGLES_H
8
9 #pragma once
10
11 /*
12  *      Copyright (C) 2005-2013 Team XBMC
13  *      http://xbmc.org
14  *
15  *  This Program is free software; you can redistribute it and/or modify
16  *  it under the terms of the GNU General Public License as published by
17  *  the Free Software Foundation; either version 2, or (at your option)
18  *  any later version.
19  *
20  *  This Program is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  *  GNU General Public License for more details.
24  *
25  *  You should have received a copy of the GNU General Public License
26  *  along with XBMC; see the file COPYING.  If not, see
27  *  <http://www.gnu.org/licenses/>.
28  *
29  */
30
31 #include "GUITexture.h"
32
33 #include "system_gl.h"
34 #include <vector>
35
36 struct PackedVertex
37 {
38   float x, y, z;
39   float u1, v1;
40   float u2, v2;
41 };
42 typedef std::vector<PackedVertex> PackedVertices;
43
44 class CGUITextureGLES : public CGUITextureBase
45 {
46 public:
47   CGUITextureGLES(float posX, float posY, float width, float height, const CTextureInfo& texture);
48   static void DrawQuad(const CRect &coords, color_t color, CBaseTexture *texture = NULL, const CRect *texCoords = NULL);
49 protected:
50   void Begin(color_t color);
51   void Draw(float *x, float *y, float *z, const CRect &texture, const CRect &diffuse, int orientation);
52   void End();
53
54   GLubyte m_col[4];
55
56   PackedVertices m_packedVertices;
57   std::vector<GLushort> m_idx;
58 };
59
60 #endif