aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone/iphone_video.mm
diff options
context:
space:
mode:
authorJohannes Schickel2012-10-10 00:34:30 +0200
committerJohannes Schickel2012-10-10 00:36:15 +0200
commit1e200620d673af4acdd2d128ed6e390df001aacf (patch)
treecceefecd0825bd04b96daf2b5a6ecf342465b856 /backends/platform/iphone/iphone_video.mm
parenta5bce746354aa5711f06de7abac442995ae0d956 (diff)
downloadscummvm-rg350-1e200620d673af4acdd2d128ed6e390df001aacf.tar.gz
scummvm-rg350-1e200620d673af4acdd2d128ed6e390df001aacf.tar.bz2
scummvm-rg350-1e200620d673af4acdd2d128ed6e390df001aacf.zip
IPHONE: Fix cursor artifacts when linear filterting is used.
We need to set a proper texture coordinate wrap parameter for this.
Diffstat (limited to 'backends/platform/iphone/iphone_video.mm')
-rw-r--r--backends/platform/iphone/iphone_video.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm
index 54e5d633d2..2ae1b0e692 100644
--- a/backends/platform/iphone/iphone_video.mm
+++ b/backends/platform/iphone/iphone_video.mm
@@ -268,6 +268,11 @@ const char *iPhone_getDocumentsDir() {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); printOpenGLError();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); printOpenGLError();
+ // We use GL_CLAMP_TO_EDGE here to avoid artifacts when linear filtering
+ // is used. If we would not use this for example the cursor in Loom would
+ // have a line/border artifact on the right side of the covered rect.
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); printOpenGLError();
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); printOpenGLError();
}
- (void)setGraphicsMode {