Mercurial > fife-parpg
comparison engine/core/video/opengl/renderbackendopengl.h @ 642:6e2151325017
* Added the ability to query the current running screen mode
* Added a method to detect the closest supported screen mode (not complete yet). If no matching screen modes are detected an exception is thrown.
* Small change to the way the screen is initialized. The screen mode now MUST be in the supported screen mode list before the screen will initialize.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 08 Oct 2010 21:22:02 +0000 |
parents | 855ad500f991 |
children | 5d6b1820b953 |
comparison
equal
deleted
inserted
replaced
641:52708806f35c | 642:6e2151325017 |
---|---|
32 // Second block: files included from the same folder | 32 // Second block: files included from the same folder |
33 #include "video/renderbackend.h" | 33 #include "video/renderbackend.h" |
34 | 34 |
35 namespace FIFE { | 35 namespace FIFE { |
36 | 36 |
37 class ScreenMode; | |
38 | |
37 /** The main class of the OpenGL-based renderer. | 39 /** The main class of the OpenGL-based renderer. |
38 * @see RenderBackend | 40 * @see RenderBackend |
39 */ | 41 */ |
40 class RenderBackendOpenGL : public RenderBackend { | 42 class RenderBackendOpenGL : public RenderBackend { |
41 public: | 43 public: |
45 void startFrame(); | 47 void startFrame(); |
46 void endFrame(); | 48 void endFrame(); |
47 void init(const std::string& driver); | 49 void init(const std::string& driver); |
48 void clearBackBuffer(); | 50 void clearBackBuffer(); |
49 | 51 |
50 Image* createMainScreen(unsigned int width, unsigned int height, unsigned char bitsPerPixel, bool fullscreen, const std::string& title, const std::string& icon); | 52 Image* createMainScreen(const ScreenMode& mode, const std::string& title, const std::string& icon); |
51 Image* createImage(const uint8_t* data, unsigned int width, unsigned int height); | 53 Image* createImage(const uint8_t* data, unsigned int width, unsigned int height); |
52 Image* createImage(SDL_Surface* surface); | 54 Image* createImage(SDL_Surface* surface); |
53 bool putPixel(int x, int y, int r, int g, int b, int a = 255); | 55 bool putPixel(int x, int y, int r, int g, int b, int a = 255); |
54 void drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a = 255); | 56 void drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a = 255); |
55 void drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a = 255); | 57 void drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a = 255); |