X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fdrawing_request.hpp;h=581438a47806716358760f3a959799faba5006ca;hb=c3c41a343669d375aaa674c7f3ac35f08f24703e;hp=b63f85111274dae6468d85ba5c3d7c4988a036a0;hpb=99cf62c2d44b4555e9761f1c8f1b10cf880c33fb;p=supertux.git diff --git a/src/video/drawing_request.hpp b/src/video/drawing_request.hpp index b63f85111..581438a47 100644 --- a/src/video/drawing_request.hpp +++ b/src/video/drawing_request.hpp @@ -23,17 +23,14 @@ #include #include -#include +#include -//#include - -//#include +#include #include "glutil.hpp" -//#include "math/vector.hpp" -//#include "color.hpp" -//#include "font.hpp" -#include +#include "math/vector.hpp" +#include "color.hpp" +#include "font.hpp" class Surface; @@ -65,39 +62,15 @@ public: Blend(GLenum s, GLenum d) : sfactor(s), dfactor(d) {} - - Unison::Video::BlendMode to_unison_blend() const - { - if(sfactor == GL_ONE && dfactor == GL_ZERO) - { - return Unison::Video::BLEND_NONE; - } - else if(sfactor == GL_SRC_ALPHA && dfactor == GL_ONE_MINUS_SRC_ALPHA) - { - return Unison::Video::BLEND_ALPHA; - } - else if(sfactor == GL_SRC_ALPHA && dfactor == GL_ONE) - { - return Unison::Video::BLEND_ADD; - } - else if(sfactor == GL_ZERO && dfactor == GL_SRC_COLOR) - { - return Unison::Video::BLEND_MOD; - } - else - { - assert(0 && "Unsupported blend factors"); - } - } }; enum Target { NORMAL, LIGHTMAP }; -/*enum RequestType +enum RequestType { - SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, GETLIGHT + SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, DRAW_LIGHTMAP, GETLIGHT }; struct SurfacePartRequest @@ -121,7 +94,14 @@ struct GradientRequest struct FillRectRequest { - Color color; + Color color; + Vector size; + float radius; +}; + +struct InverseEllipseRequest +{ + Color color; Vector size; }; @@ -154,7 +134,7 @@ struct DrawingRequest struct GetLightRequest { Color* color_ptr; -};*/ +}; #endif