if (tex_only)
{
- if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
- prog = gc->shared->shader.tex_nomul.prog;
+ if (tex->pt->dyn.img)
+ {
+ if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
+ prog = gc->shared->shader.img_nomul.prog;
+ else
+ prog = gc->shared->shader.img.prog;
+ }
else
- prog = gc->shared->shader.tex.prog;
+ {
+ if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
+ prog = gc->shared->shader.tex_nomul.prog;
+ else
+ prog = gc->shared->shader.tex.prog;
+ }
}
else
{
if (tex_only)
{
- if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
+ if (tex->pt->dyn.img)
{
- if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
- (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
- prog = gc->shared->shader.tex_nomul.prog;
+ if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
+ {
+ if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
+ (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
+ prog = gc->shared->shader.img_nomul.prog;
+ else
+ prog = gc->shared->shader.img.prog;
+ }
else
- prog = gc->shared->shader.tex.prog;
+ prog = gc->shared->shader.img.prog;
}
else
- prog = gc->shared->shader.tex.prog;
+ {
+ if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
+ {
+ if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) &&
+ (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff))
+ prog = gc->shared->shader.tex_nomul.prog;
+ else
+ prog = gc->shared->shader.tex.prog;
+ }
+ else
+ prog = gc->shared->shader.tex.prog;
+ }
}
else
{
attr[1] = pt->w;
attr[3] = pt->h;
- // FIXME: RGBA/ABGR is swapped.
- // FIXME: seems a bit slower than i'd like - maybe too many flushes?
- // FIXME: YCbCr no support as yet
// FIXME: stride not fetched or used from engine api
// FIXME: have to set dynamic AFTER setting alpha and size. shoudl allow
// any order
+ // FIXME: seems a bit slower than i'd like - maybe too many flushes?
+ // FIXME: YCbCr no support as yet
pt->dyn.img = secsym_eglCreateImage(egldisplay,
EGL_NO_CONTEXT,
EGL_MAP_GL_TEXTURE_2D_SEC,
if (tex->alpha)
{
if (gc->shared->info.bgra)
- tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
+ tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
else
- tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
+ tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
}
else
{
if (gc->shared->info.bgra)
- tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
+ tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
else
- tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
+ tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
}
if (!tex->pt)
{