(strstr(ext, "OES_texture_npot")))
shared->info.tex_npo2 = 1;
if ((strstr(ext, "GL_NV_texture_rectangle")) ||
- (strstr(ext, "GL_EXT_texture_rectangle")))
+ (strstr(ext, "GL_EXT_texture_rectangle")) ||
+ (strstr(ext, "GL_ARB_texture_rectangle"))
+ )
shared->info.tex_rect = 1;
}
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,
{
unsigned int n;
-// disable - has a bug somewhere
-// if (gc->shared->info.tex_npo2) return;
+ if (gc->shared->info.tex_npo2) return;
/*if (gc->shared->info.tex_rect) return;*/
*w = _nearest_pow2(*w);
*h = _nearest_pow2(*h);
static int
_tex_round_slot(Evas_GL_Context *gc, int h)
{
-// disable. has a bug somewhere
-// if (!gc->shared->info.tex_npo2)
+ if (!gc->shared->info.tex_npo2)
h = _nearest_pow2(h);
return (h + 15) >> 4;
}
pt = calloc(1, sizeof(Evas_GL_Texture_Pool));
if (!pt) return NULL;
+ h = _tex_round_slot(gc, h) << 4;
_tex_adjust(gc, &w, &h);
pt->gc = gc;
pt->w = w;
if ((w > 512) || (h > 512))
{
- pt = _pool_tex_new(gc, w + 2, h + 1, format);
+ pt = _pool_tex_new(gc, w, h, format);
gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, pt);
pt->slot = -1;
pt->fslot = -1;
}
}
pt = _pool_tex_new(gc, atlas_w, h, format);
- gc->shared->tex.atlas[th][th2] = eina_list_prepend(gc->shared->tex.atlas[th][th2], pt);
+ gc->shared->tex.atlas[th][th2] =
+ eina_list_prepend(gc->shared->tex.atlas[th][th2], pt);
pt->slot = th;
pt->fslot = th2;
*u = 0;
tex->gc = gc;
tex->references = 1;
// if (im->cache_entry.flags.alpha)
- tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
im->cache_entry.h + 1, GL_RGBA,
&u, &v, &l_after, 1024);
// else