glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
ok = _tex_2d(gc, pt->intformat, w, h, pt->format, pt->dataformat);
- glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex);
+ glBindTexture(GL_TEXTURE_2D, gc->state.current.cur_tex);
if (!ok)
{
glDeleteTextures(1, &(pt->texture));
}
glsym_glBindFramebuffer(GL_FRAMEBUFFER, fnum);
- glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex);
+ glBindTexture(GL_TEXTURE_2D, gc->state.current.cur_tex);
if (!ok)
{
glTexParameteri(im->native.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(im->native.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glBindTexture(im->native.target, 0);
- glBindTexture(im->native.target, gc->pipe[0].shader.cur_tex);
+ glBindTexture(im->native.target, gc->state.current.cur_tex);
texinfo.n.num++;
texinfo.n.pix += pt->w * pt->h;
goto error;
}
- glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex);
+ glBindTexture(GL_TEXTURE_2D, gc->state.current.cur_tex);
#else
if (gc + w + h + intformat + format) return pt;
#endif
#endif
glDeleteTextures(1, &(pt->texture));
- if (pt->gc->pipe[0].shader.cur_tex == pt->texture)
- pt->gc->pipe[0].shader.cur_tex = 0;
+ if (pt->gc->state.current.cur_tex == pt->texture)
+ pt->gc->state.current.cur_tex = 0;
if (pt->fb)
{
glsym_glDeleteFramebuffers(1, &(pt->fb));
tpix);
}
//glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
void
im->image.data);
}
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
{
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
return;
}
_tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out);
// Switch back to current texture
- if (tex->ptt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->ptt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
// Now prepare uploading the main texture before returning;
async = malloc(sizeof (Evas_GL_Texture_Async_Preload));
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
_tex_sub_2d(tex->gc, tex->x, tex->y, w, h, tex->pt->format,
tex->pt->dataformat, pixels);
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
Evas_GL_Texture *
}
}
on_error:
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
Evas_GL_Texture *
_tex_sub_2d(tex->gc, 0, y, w / 2, 1, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2) + y]);
}
}
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
static Evas_GL_Texture *
_tex_sub_2d(tex->gc, 0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[y]);
}
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
void
_tex_sub_2d(tex->gc, 0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[h + y]);
}
}
- if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
- glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);
+ if (tex->pt->texture != tex->gc->state.current.cur_tex)
+ glBindTexture(GL_TEXTURE_2D, tex->gc->state.current.cur_tex);
}
void