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_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGL_H
00023 #define FIFE_VIDEO_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGL_H
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "video/renderbackend.h"
00034
00035 namespace FIFE {
00036
00040 class RenderBackendOpenGL : public RenderBackend {
00041 public:
00042 RenderBackendOpenGL(const SDL_Color& colorkey);
00043 virtual ~RenderBackendOpenGL();
00044 const std::string& getName() const;
00045 void startFrame();
00046 void endFrame();
00047 void init();
00048 Image* createMainScreen(unsigned int width, unsigned int height, unsigned char bitsPerPixel, bool fullscreen, const std::string& title, const std::string& icon);
00049 Image* createImage(const uint8_t* data, unsigned int width, unsigned int height);
00050 Image* createImage(SDL_Surface* surface);
00051 bool putPixel(int x, int y, int r, int g, int b);
00052 void drawLine(const Point& p1, const Point& p2, int r, int g, int b);
00053 void drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b);
00054 void drawVertex(const Point& p, const uint8_t size, int r, int g, int b);
00055
00056 private:
00057 SDL_PixelFormat m_rgba_format;
00058 };
00059
00060 }
00061
00062 #endif
00063