00001 #ifndef SDLCANVAS_H
00002 #define SDLCANVAS_H
00003
00004 #include <vrs/opengl/glcanvas.h>
00005 #include <vrs/sdl/config.h>
00006
00007 namespace VRS {
00008
00015 class VRS_SDL_API SDLCanvas : public GLCanvas {
00016 public:
00018 SDLCanvas(const std::string& name, unsigned int width, unsigned int height, int properties = GLCanvas::RGBDD, bool fullscreen = false);
00020 virtual ~SDLCanvas();
00021
00023 virtual void create();
00025 virtual void destroy();
00026
00028 virtual void setSize(unsigned int width, unsigned int height);
00030 virtual void setCursor(Cursor::Shape cursor);
00032 virtual unsigned int getWidth() const;
00034 virtual unsigned int getHeight() const;
00036 virtual int getProperties() const;
00037
00039 void mainLoop();
00040
00041 protected:
00043 virtual void finishRedisplay();
00044
00045 private:
00047 void setMode();
00048
00050 std::string _name;
00051
00053 unsigned int _width;
00055 unsigned int _height;
00057 int _properties;
00059 bool _fullscreen;
00060 };
00061
00062 }
00063
00064 #endif // SDLCANVAS_H