aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/opengl-graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.h')
-rw-r--r--backends/graphics/opengl/opengl-graphics.h57
1 files changed, 42 insertions, 15 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 35435c156e..d3f8d792ba 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -30,6 +30,8 @@
#include "common/frac.h"
#include "common/mutex.h"
+#include "graphics/surface.h"
+
namespace Graphics {
class Font;
} // End of namespace Graphics
@@ -48,8 +50,7 @@ class Shader;
#endif
enum {
- GFX_LINEAR = 0,
- GFX_NEAREST = 1
+ GFX_OPENGL = 0
};
class OpenGLGraphicsManager : virtual public GraphicsManager {
@@ -115,6 +116,7 @@ public:
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void displayMessageOnOSD(const char *msg);
+ virtual void displayActivityIconOnOSD(const Graphics::Surface *icon);
// PaletteManager interface
virtual void setPalette(const byte *colors, uint start, uint num);
@@ -210,7 +212,7 @@ private:
#ifdef USE_RGB_COLOR
gameFormat(),
#endif
- aspectRatioCorrection(false), graphicsMode(GFX_LINEAR) {
+ aspectRatioCorrection(false), graphicsMode(GFX_OPENGL), filtering(true) {
}
bool valid;
@@ -221,6 +223,7 @@ private:
#endif
bool aspectRatioCorrection;
int graphicsMode;
+ bool filtering;
bool operator==(const VideoState &right) {
return gameWidth == right.gameWidth && gameHeight == right.gameHeight
@@ -228,7 +231,8 @@ private:
&& gameFormat == right.gameFormat
#endif
&& aspectRatioCorrection == right.aspectRatioCorrection
- && graphicsMode == right.graphicsMode;
+ && graphicsMode == right.graphicsMode
+ && filtering == right.filtering;
}
bool operator!=(const VideoState &right) {
@@ -545,29 +549,52 @@ protected:
private:
/**
- * The OSD's contents.
+ * Request for the OSD icon surface to be updated.
+ */
+ bool _osdMessageChangeRequest;
+
+ /**
+ * The next OSD message.
+ *
+ * If this value is not empty, the OSD message will be set
+ * to it on the next frame.
+ */
+ Common::String _osdMessageNextData;
+
+ /**
+ * Set the OSD message surface with the value of the next OSD message.
+ */
+ void osdMessageUpdateSurface();
+
+ /**
+ * The OSD message's contents.
*/
- Surface *_osd;
+ Surface *_osdMessageSurface;
/**
- * Current opacity level of the OSD.
+ * Current opacity level of the OSD message.
*/
- uint8 _osdAlpha;
+ uint8 _osdMessageAlpha;
/**
- * When fading the OSD has started.
+ * When fading the OSD message has started.
*/
- uint32 _osdFadeStartTime;
+ uint32 _osdMessageFadeStartTime;
+
+ enum {
+ kOSDMessageFadeOutDelay = 2 * 1000,
+ kOSDMessageFadeOutDuration = 500,
+ kOSDMessageInitialAlpha = 80
+ };
/**
- * Mutex to allow displayMessageOnOSD to be used from the audio thread.
+ * The OSD background activity icon's contents.
*/
- Common::Mutex _osdMutex;
+ Surface *_osdIconSurface;
enum {
- kOSDFadeOutDelay = 2 * 1000,
- kOSDFadeOutDuration = 500,
- kOSDInitialAlpha = 80
+ kOSDIconTopMargin = 10,
+ kOSDIconRightMargin = 10
};
#endif
};