-// $Id: video_systems.hpp 5138 2007-08-15 01:02:22Z tuxdev $
-//
// SuperTux
// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details.
//
// 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 __RENDER_SYTSTEMS_HPP__
-#define __RENDER_SYTSTEMS_HPP__
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEMS_HPP
+#define HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEMS_HPP
#include <config.h>
-#include <string>
#include <SDL.h>
+#include <string>
+
+#include "video/texture_ptr.hpp"
class Renderer;
class Lightmap;
-class Texture;
class Surface;
+class SurfaceData;
-enum VideoSystem {
- OPENGL,
- PURE_SDL,
- NUM_SYSTEMS
-};
+class VideoSystem
+{
+public:
+ enum Enum {
+ AUTO_VIDEO,
+ OPENGL,
+ PURE_SDL,
+ NUM_SYSTEMS
+ };
+
+public:
+ static std::unique_ptr<Renderer> new_renderer();
+ static std::unique_ptr<Lightmap> new_lightmap();
+ static TexturePtr new_texture(SDL_Surface *image);
+ static SurfaceData* new_surface_data(const Surface &surface);
+ static void free_surface_data(SurfaceData* surface_data);
-Renderer *new_renderer();
-Lightmap *new_lightmap();
-Texture *new_texture(SDL_Surface *image);
-void *new_surface_data(const Surface &surface);
-void free_surface_data(void *surface_data);
-VideoSystem get_video_system(const std::string &video);
-std::string get_video_string(VideoSystem video);
+ static Enum get_video_system(const std::string &video);
+ static std::string get_video_string(Enum video);
+
+private:
+ VideoSystem();
+ VideoSystem(const VideoSystem&);
+ VideoSystem& operator=(const VideoSystem&);
+};
#endif
+
+/* EOF */