SuperTuxKart
Loading...
Searching...
No Matches
progress_bar_android.hpp
1// SuperTuxKart - a fun racing game with go-kart
2// Copyright (C) 2014-2015 SuperTuxKart-Team
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version 3
7// of the License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18#ifndef HEADER_PROGRESS_BAR_ANDROID_HPP
19#define HEADER_PROGRESS_BAR_ANDROID_HPP
20
21#ifdef ANDROID
22
23#include "IrrlichtDevice.h"
24#include "graphics/gl_headers.hpp"
25
26class ProgressBarAndroid
27{
28private:
29#ifndef SERVER_ONLY
30 GLuint m_program;
31 GLuint m_vertex_shader;
32 GLuint m_fragment_shader;
33 GLint m_position;
34 GLint m_progress;
35 GLuint m_vbo;
36#endif
37
38 irr::IrrlichtDevice* m_device;
39 bool m_initialized;
40 bool m_close_event_received;
41
42 bool compileShaders();
43 void deleteShaders();
44 void init();
45 void close();
46
47public:
48 ProgressBarAndroid();
49 ~ProgressBarAndroid();
50
51 void draw(float value);
52 bool closeEventReceived() {return m_close_event_received;}
53};
54
55#endif
56
57#endif