texfmt, GL_UNSIGNED_BYTE, NULL);
for (y = 0; y < tex->h; y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w, tex->h,
+ 0, y, tex->w, 1,
texfmt, GL_UNSIGNED_BYTE, rows[y]);
glGenTextures(1, &(tex->texture2));
texfmt, GL_UNSIGNED_BYTE, NULL);
for (y = 0; y < (tex->h / 2); y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w / 2, tex->h / 2,
+ 0, y, tex->w / 2, 1,
texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]);
glGenTextures(1, &(tex->texture3));
texfmt, GL_UNSIGNED_BYTE, NULL);
for (y = 0; y < (tex->h / 2); y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w / 2, tex->h / 2,
+ 0, y, tex->w / 2, 1,
texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]);
glUseProgramObjectARB(0);
}
for (y = 0; y < tex->h; y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w, tex->h,
+ 0, y, tex->w, 1,
texfmt, GL_UNSIGNED_BYTE, rows[y]);
glBindTexture(GL_TEXTURE_2D, tex->texture2);
}
for (y = 0; y < (tex->h / 2); y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w / 2, tex->h / 2,
+ 0, y, tex->w / 2, 1,
texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]);
glBindTexture(GL_TEXTURE_2D, tex->texture3);
}
for (y = 0; y < (tex->h / 2); y++)
glTexSubImage2D(GL_TEXTURE_2D, 0,
- 0, y, tex->w / 2, tex->h / 2,
+ 0, y, tex->w / 2, 1,
texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]);
if (tex->gc->texture) tex->gc->texture->references--;