Merge branch 'master' of https://code.google.com/p/supertux
[supertux.git] / src / video / drawing_context.hpp
index 5715df6..13f28c9 100644 (file)
@@ -52,11 +52,9 @@ inline int next_po2(int val)
 class DrawingContext
 {
 public:
-  DrawingContext();
+  DrawingContext(Renderer& renderer, Lightmap& lightmap);
   ~DrawingContext();
 
-  void init_renderer();
-
   /// Adds a drawing request for a surface into the request list.
   void draw_surface(SurfacePtr surface, const Vector& position,
                     int layer);
@@ -86,6 +84,9 @@ public:
 
   void draw_inverse_ellipse(const Vector& pos, const Vector& size, const Color& color, int layer);
 
+  /// Returns the visible area in world coordinates
+  Rectf get_cliprect() const;
+
   /// Processes all pending drawing requests and flushes the list.
   void do_drawing();
 
@@ -151,8 +152,8 @@ private:
   };
 
 private:
-  Renderer *renderer;
-  Lightmap *lightmap;
+  Rendererrenderer;
+  Lightmaplightmap;
 
   /// the transform stack
   std::vector<Transform> transformstack;