[fusion-commits] Zoom plugin with accessibility awareness: Changes to 'master' (33f7ef16a7896f26aa067ef0a3d11008845a313e)
kristian at server.opencompositing.org
kristian at server.opencompositing.org
Tue May 20 22:21:39 CEST 2008
New commits:
commit 33f7ef16a7896f26aa067ef0a3d11008845a313e
Author: Kristian Lyngstol <kristian at yoda.lyngstol.net>
Date: Tue May 20 22:19:44 2008 +0200
Obey texture filtering settings on cursor too
This is not really a good permanent solution, ideally the cursor should
be handled by a CompTexture and thus get this automatically, but this is a
quick fix until I come up with something better.
ezoom.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
Modified: fusion/plugins/ezoom/ezoom.c
===================================================================
--- fusion/plugins/ezoom/ezoom.c
+++ fusion/plugins/ezoom/ezoom.c
@@ -1273,6 +1273,7 @@ zoomUpdateCursor (CompScreen * s, CursorTexture * cursor)
unsigned char *pixels;
int i;
Display *dpy = s->display->display;
+ ZOOM_SCREEN (s);
if (!cursor->isSet)
{
@@ -1282,10 +1283,22 @@ zoomUpdateCursor (CompScreen * s, CursorTexture * cursor)
glEnable (GL_TEXTURE_RECTANGLE_ARB);
glGenTextures (1, &cursor->texture);
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, cursor->texture);
- glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
- GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
- GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ if (zs->opt[SOPT_FILTER_LINEAR].value.b &&
+ s->display->textureFilter != GL_NEAREST)
+ {
+ glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ }
+ else
+ {
+ glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ }
glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri (GL_TEXTURE_RECTANGLE_ARB,
More information about the commits
mailing list