From 1e200620d673af4acdd2d128ed6e390df001aacf Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 10 Oct 2012 00:34:30 +0200 Subject: IPHONE: Fix cursor artifacts when linear filterting is used. We need to set a proper texture coordinate wrap parameter for this. --- backends/platform/iphone/iphone_video.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backends/platform/iphone') 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 { -- cgit v1.2.3