Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/gl_common Modified Files: evas_gl_context.c evas_gl_image.c evas_gl_texture.c Log Message: was playing with ansiotropic filtering - with mipmap stuff it looks nicer. stillnot perfect. xrender engine detects "same source data pointer" and shares nicely now :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/gl_common/evas_gl_context.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- evas_gl_context.c 18 Jun 2005 01:00:31 -0000 1.11 +++ evas_gl_context.c 6 Oct 2005 02:38:34 -0000 1.12 @@ -65,10 +65,6 @@ { if (strstr(ext, "GL_SGIS_generate_mipmap")) gc->ext.sgis_generate_mipmap = 1; if (strstr(ext, "GL_NV_texture_rectangle")) gc->ext.nv_texture_rectangle = 1; - /* technically this should work, as its a compatible */ - /* implementation of the nvidia texture_rectangle extension */ - /* since the #define value is the same as is the description */ - /* it was fixed in the latest (3.2.5) fglrx drivers */ if (strstr(ext, "GL_EXT_texture_rectangle")) gc->ext.nv_texture_rectangle = 1; printf("GL EXT supported: GL_SGIS_generate_mipmap = %x\n", gc->ext.sgis_generate_mipmap); printf("GL EXT supported: GL_NV_texture_rectangle = %x\n", gc->ext.nv_texture_rectangle); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/gl_common/evas_gl_image.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_gl_image.c 22 May 2005 02:49:49 -0000 1.6 +++ evas_gl_image.c 6 Oct 2005 02:38:34 -0000 1.7 @@ -172,7 +172,8 @@ oh = (dh * im->tex->th) / sh; evas_gl_common_context_texture_set(gc, im->tex, smooth, ow, oh); if ((!im->tex->have_mipmaps) && (smooth) && - ((im->tex->uw < im->tex->tw) || (im->tex->uh < im->tex->th))) + ((im->tex->uw < im->tex->tw) || (im->tex->uh < im->tex->th)) && + (!gc->ext.sgis_generate_mipmap)) evas_gl_common_texture_mipmaps_build(im->tex, im->im, smooth); if (im->tex->not_power_of_two) @@ -204,9 +205,19 @@ evas_gl_common_context_write_buf_set(gc, GL_BACK); glBegin(GL_QUADS); - glTexCoord2d(tx1, ty1); glVertex2i(dx , dy ); - glTexCoord2d(tx2, ty1); glVertex2i(dx + dw, dy ); - glTexCoord2d(tx2, ty2); glVertex2i(dx + dw, dy + dh); - glTexCoord2d(tx1, ty2); glVertex2i(dx , dy + dh); + if (im->tex->not_power_of_two) + { + glTexCoord2d(tx1, ty1); glVertex2i(dx , dy ); + glTexCoord2d(tx2, ty1); glVertex2i(dx + dw, dy ); + glTexCoord2d(tx2, ty2); glVertex2i(dx + dw, dy + dh); + glTexCoord2d(tx1, ty2); glVertex2i(dx , dy + dh); + } + else + { + glTexCoord2d(tx1, ty1); glVertex2f(dx , dy ); + glTexCoord2d(tx2, ty1); glVertex2f(dx + dw + 0.5, dy ); + glTexCoord2d(tx2, ty2); glVertex2f(dx + dw + 0.5, dy + dh + 0.5); + glTexCoord2d(tx1, ty2); glVertex2f(dx , dy + dh + 0.5); + } glEnd(); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/gl_common/evas_gl_texture.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- evas_gl_texture.c 18 Jun 2005 01:00:31 -0000 1.7 +++ evas_gl_texture.c 6 Oct 2005 02:38:34 -0000 1.8 @@ -68,12 +68,13 @@ glEnable(GL_TEXTURE_2D); glGenTextures(1, &(tex->texture)); glBindTexture(GL_TEXTURE_2D, tex->texture); - if (gc->texture) gc->texture->references--; gc->texture = tex; gc->change.texture = 1; tex->references++; + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 8); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs