diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-28 00:30:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-28 23:35:20 +0300 |
commit | a0b2deb4192bddad4d061f5d5df86411a437f01f (patch) | |
tree | 4739472959d83045eac4d7f7ddf3dc265d37b45c /src/render/graphics.h | |
parent | 226202ff807dc860991af0d6665ef9e9b48c1bed (diff) | |
download | manaverse-a0b2deb4192bddad4d061f5d5df86411a437f01f.tar.gz manaverse-a0b2deb4192bddad4d061f5d5df86411a437f01f.tar.bz2 manaverse-a0b2deb4192bddad4d061f5d5df86411a437f01f.tar.xz manaverse-a0b2deb4192bddad4d061f5d5df86411a437f01f.zip |
add support for screen scale in OpenGL modes.
Diffstat (limited to 'src/render/graphics.h')
-rw-r--r-- | src/render/graphics.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h index 82ef32fea..adf1b97c4 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -127,9 +127,13 @@ class Graphics : public gcn::Graphics /** * Try to create a window with the given settings. */ - virtual bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) = 0; + virtual bool setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) = 0; /** * Set fullscreen mode. @@ -341,8 +345,16 @@ class Graphics : public gcn::Graphics virtual void completeCache() = 0; + int getScale() const + { return mScale; } + + virtual bool allowScale() const + { return false; } + int mWidth; int mHeight; + int mActualWidth; + int mActualHeight; protected: /** @@ -350,9 +362,13 @@ class Graphics : public gcn::Graphics */ Graphics(); - void setMainFlags(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + void setMainFlags(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame); int getOpenGLFlags() const A_WARN_UNUSED; @@ -386,6 +402,7 @@ class Graphics : public gcn::Graphics std::string mName; int mStartFreeMem; bool mSync; + int mScale; gcn::Color mColor; gcn::Color mColor2; }; |