Fixed resize handling of lightmaps, they are now recreated on resize()
[supertux.git] / src / video / sdl / sdl_lightmap.hpp
index 4719c38..1247a64 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "video/lightmap.hpp"
 
+#include "SDL.h"
+
 class Color;
 struct DrawingRequest;
 
@@ -28,28 +30,22 @@ public:
   SDLLightmap();
   ~SDLLightmap();
 
-  void start_draw(const Color &ambient_color);
-  void end_draw();
-  void do_draw();
-  void draw_surface(const DrawingRequest& request);
-  void draw_surface_part(const DrawingRequest& request);
-  void draw_text(const DrawingRequest& request);
-  void draw_gradient(const DrawingRequest& request);
-  void draw_filled_rect(const DrawingRequest& request);
-  void get_light(const DrawingRequest& request) const;
+  void start_draw(const Color &ambient_color) override;
+  void end_draw() override;
+  void do_draw() override;
+  void draw_surface(const DrawingRequest& request) override;
+  void draw_surface_part(const DrawingRequest& request) override;
+  void draw_gradient(const DrawingRequest& request) override;
+  void draw_filled_rect(const DrawingRequest& request) override;
+  void draw_inverse_ellipse(const DrawingRequest& request) override;
+  void get_light(const DrawingRequest& request) const override;
 
 private:
-  SDL_Surface* screen;
-  Uint8 *red_channel;
-  Uint8 *blue_channel;
-  Uint8 *green_channel;
-  int width;
-  int height;
-  int numerator;
-  int denominator;
-  int LIGHTMAP_DIV;
-
-  void light_blit(SDL_Surface *src, SDL_Rect *src_rect, int dstx, int dsty);
+  SDL_Renderer* m_renderer;
+  SDL_Texture* m_texture;
+  int m_width;
+  int m_height;
+  int m_LIGHTMAP_DIV;
 
 private:
   SDLLightmap(const SDLLightmap&);