glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- // +-+
- // +-+
- //
_tex_sub_2d(tex->x, tex->y, w, h, tex->pt->format, tex->pt->dataformat,
pixels);
- DATA8 *ndata;
- ndata = alloca(w * h);
- memset(ndata, 0x00, sizeof(DATA8) * w * h);
-
- // |xxx
- // |xxx
- //
- _tex_sub_2d(tex->x - 1, tex->y, 1, h, tex->pt->format, tex->pt->dataformat,
- ndata);
-
- // xxx|
- // xxx|
- //
- _tex_sub_2d(tex->x + w, tex->y, 1, h, tex->pt->format, tex->pt->dataformat,
- ndata + (w - 1));
-
- // xxx
- // xxx
- // ---
- _tex_sub_2d(tex->x, tex->y + h, w, 1, tex->pt->format, tex->pt->dataformat,
- ndata + ((h - 1) * w));
-
- // xxx
- // xxx
- // o
- _tex_sub_2d(tex->x - 1, tex->y + h, 1, 1, tex->pt->format, tex->pt->dataformat,
- ndata + ((h - 1) * w));
-
- // xxx
- // xxx
- // o
- _tex_sub_2d(tex->x + w, tex->y + h, 1, 1, tex->pt->format, tex->pt->dataformat,
- ndata + ((h - 1) * w) + (w - 1));
-
if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex)
{
glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex);