Some harmless space for readability and an assert()
[supertux.git] / src / video / renderer.hpp
index 2bd96d7..2839492 100644 (file)
@@ -16,6 +16,7 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
 #ifndef SUPERTUX_RENDERER_H
 #define SUPERTUX_RENDERER_H
 
@@ -24,7 +25,7 @@
 #include <memory>
 
 #include <stdint.h>
-
+#include <assert.h>
 #include <SDL_video.h>
 
 #include "glutil.hpp"
@@ -42,14 +43,23 @@ struct DrawingRequest;
 class Renderer
 {
 public:
-  virtual ~Renderer() {}
+  Renderer();
+  virtual ~Renderer();
 
   virtual void draw_surface(const DrawingRequest& request) = 0;
   virtual void draw_surface_part(const DrawingRequest& request) = 0;
   virtual void draw_gradient(const DrawingRequest& request) = 0;
   virtual void draw_filled_rect(const DrawingRequest& request)= 0;
+  virtual void draw_inverse_ellipse(const DrawingRequest& request)= 0;
   virtual void do_take_screenshot() = 0;
   virtual void flip() = 0;
+  virtual void resize(int w, int h) = 0;
+  virtual void apply_config() = 0;
+
+  static Renderer* instance() { assert(instance_); return instance_; }
+  
+protected:
+  static Renderer* instance_;
 };
 
 #endif