renderbackendsdl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FIFE_VIDEO_RENDERBACKENDS_SDL_RENDERBACKENDSDL_H
00023 #define FIFE_VIDEO_RENDERBACKENDS_SDL_RENDERBACKENDSDL_H
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "video/renderbackend.h"
00034
00035 namespace FIFE {
00036
00041 class RenderBackendSDL : public RenderBackend {
00042 public:
00043 RenderBackendSDL(const SDL_Color& colorkey);
00044 virtual ~RenderBackendSDL();
00045 const std::string& getName() const;
00046
00047 void startFrame();
00048 void endFrame();
00049 void init();
00050 Image* createMainScreen(unsigned int width, unsigned int height, unsigned char bitsPerPixel, bool fullscreen, const std::string& title, const std::string& icon);
00051 Image* createImage(const uint8_t* data, unsigned int width, unsigned int height);
00052 Image* createImage(SDL_Surface* surface);
00053 bool putPixel(int x, int y, int r, int g, int b);
00054 void drawLine(const Point& p1, const Point& p2, int r, int g, int b);
00055 void drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b);
00056 void drawVertex(const Point& p, const uint8_t size, int r, int g, int b);
00057 };
00058
00059 }
00060
00061 #endif