From c6323bbaec525f7c643e8146d55c2131448ce39a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 13 Nov 2004 05:05:24 +0000 Subject: [PATCH] aaaaaaaaaah. rectangulkar textures... fix fix... :) SVN revision: 12200 --- legacy/evas/configure.in | 21 ++++++--------------- .../src/lib/engines/gl_common/evas_gl_gradient.c | 16 +++++++++++----- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/legacy/evas/configure.in b/legacy/evas/configure.in index 4567843..a52af69 100644 --- a/legacy/evas/configure.in +++ b/legacy/evas/configure.in @@ -111,22 +111,13 @@ AC_ARG_WITH(qtdir, qt_dir="/opt/Qtopia"; ]) # check for freetype -AC_ARG_WITH(freetype-config, -[ --with-freetype-config=FREETYPE_CONFIG use freetype-config specified ], -[ - FREETYPE_CONFIG=$withval; - echo "using "$FREETYPE_CONFIG" for freetype-config"; -],[ - PROG="freetype-config"; - AC_PATH_PROG(FREETYPE_CONFIG, $PROG, "", $PATH) +AC_ARG_WITH(freetype-config, [ --with-freetype-config=FREETYPE_CONFIG use freetype-config specified ], +[ FREETYPE_CONFIG=$withval; + echo "using "$FREETYPE_CONFIG" for freetype-config"; ], +[ if test -z "$FREETYPE_CONFIG"; then + AC_PATH_PROG(FREETYPE_CONFIG, "freetype-config", "", $PATH) + fi ]) -if [ test -z "$FREETYPE_CONFIG" ]; then - echo $PROG " is not in your \$PATH. Please ensure it is."; - echo "You may need to install the librarya and/or development packages"; - echo "that contain this configure-script."; - echo "FATAL ERROR. ABORT."; - exit -1; -fi freetype_cflags=`$FREETYPE_CONFIG --cflags` freetype_libs=`$FREETYPE_CONFIG --libs` diff --git a/legacy/evas/src/lib/engines/gl_common/evas_gl_gradient.c b/legacy/evas/src/lib/engines/gl_common/evas_gl_gradient.c index 66e2b12..16f8d9c 100644 --- a/legacy/evas/src/lib/engines/gl_common/evas_gl_gradient.c +++ b/legacy/evas/src/lib/engines/gl_common/evas_gl_gradient.c @@ -52,7 +52,8 @@ evas_gl_common_gradient_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL 0, 0, 0, 0); if (!gr->tex) _evas_gl_common_gradient_texture_build(gc, gr); - evas_gl_common_context_texture_set(gc, gr->tex, 255, 3, 1); + evas_gl_common_context_texture_set(gc, gr->tex, 0, 255, 3); + evas_gl_common_context_read_buf_set(gc, GL_BACK); evas_gl_common_context_write_buf_set(gc, GL_BACK); { @@ -88,6 +89,11 @@ evas_gl_common_gradient_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL { t[i] = (1.0 + ((((0.5) + (t[i] / 2.0)) * (256.0 - 2.0)))) / 256.0; t[i + 1] = (1.0 + ((((0.5) - (t[i + 1] / 2.0))) * 2.0)) / 4.0; + if (gc->ext.nv_texture_rectangle) + { + t[i] *= 256.0; + t[i + 1] *= 4.0; + } } glBegin(GL_QUADS); glTexCoord2d(t[0], t[1]); glVertex2i(x, y); @@ -113,10 +119,10 @@ _evas_gl_common_gradient_texture_build(Evas_GL_Context *gc, Evas_GL_Gradient *gr im = evas_common_image_create(256, 4); if (im) { - memcpy(im->image->data , map, 256 * sizeof(DATA32)); - memcpy(im->image->data + 256, map, 256 * sizeof(DATA32)); - memcpy(im->image->data + 512, map, 256 * sizeof(DATA32)); - memcpy(im->image->data + 768, map, 256 * sizeof(DATA32)); + int i; + + for (i = 0; i < 4; i++) + memcpy(im->image->data + (i * 256) , map, 256 * sizeof(DATA32)); im->flags |= RGBA_IMAGE_HAS_ALPHA; gr->tex = evas_gl_common_texture_new(gc, im, 0); evas_common_image_free(im); -- 2.7.4