0345e15e0f513c5e35fd26714ed1f2fdce52ce96
[supertux.git] / src / video / gl / gl_painter.hpp
1 //  SuperTux
2 //  Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
3 //
4 //  This program is free software: you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation, either version 3 of the License, or
7 //  (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, see <http://www.gnu.org/licenses/>.
16
17 #ifndef HEADER_SUPERTUX_VIDEO_GL_GL_PAINTER_HPP
18 #define HEADER_SUPERTUX_VIDEO_GL_GL_PAINTER_HPP
19
20 #ifdef USE_GLBINDING
21 #include <glbinding/gl/gl.h>
22 using namespace gl;
23 #else
24 #include <GL/glew.h>
25
26 #include "SDL_opengl.h"
27 #endif
28
29 class DrawingRequest;
30
31 class GLPainter
32 {
33 private:
34   static GLuint s_last_texture;
35
36 public:
37   GLPainter();
38
39   static void draw_surface(const DrawingRequest& request);
40   static void draw_surface_part(const DrawingRequest& request);
41   static void draw_gradient(const DrawingRequest& request);
42   static void draw_filled_rect(const DrawingRequest& request);
43   static void draw_inverse_ellipse(const DrawingRequest& request);
44
45 private:
46   GLPainter(const GLPainter&) = delete;
47   GLPainter& operator=(const GLPainter&) = delete;
48 };
49
50 #endif
51
52 /* EOF */