2 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
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.
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.
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/>.
17 #ifndef HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
18 #define HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
26 #include "math/vector.hpp"
27 #include "video/color.hpp"
28 #include "video/font.hpp"
29 #include "video/glutil.hpp"
33 // some constants for predefined layer values
35 LAYER_BACKGROUND0 = -300,
36 LAYER_BACKGROUND1 = -200,
37 LAYER_BACKGROUNDTILES = -100,
40 LAYER_FLOATINGOBJECTS = 150,
41 LAYER_FOREGROUNDTILES = 200,
42 LAYER_FOREGROUND0 = 300,
43 LAYER_FOREGROUND1 = 400,
55 : sfactor(GL_SRC_ALPHA), dfactor(GL_ONE_MINUS_SRC_ALPHA)
58 Blend(GLenum s, GLenum d)
59 : sfactor(s), dfactor(d)
69 SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, DRAW_LIGHTMAP, GETLIGHT
72 struct SurfacePartRequest
74 SurfacePartRequest() :
80 const Surface* surface;
95 FontAlignment alignment;
98 TextRequest(const TextRequest&);
99 TextRequest& operator=(const TextRequest&);
102 struct GradientRequest
115 struct FillRectRequest
128 struct InverseEllipseRequest
130 InverseEllipseRequest() :
139 struct DrawingRequest
146 DrawingEffect drawing_effect;
163 color(1.0f, 1.0f, 1.0f, 1.0f),
167 bool operator<(const DrawingRequest& other) const
169 return layer < other.layer;
173 struct GetLightRequest