Cleaned up sprite render; use UVs

This commit is contained in:
2022-12-29 17:27:41 +00:00
parent 0bdfa9e814
commit 804c2de617
6 changed files with 43 additions and 38 deletions

View File

@@ -195,6 +195,26 @@ void tex_anim_calc_uv(struct TexAnimation *anim)
struct glrect tex_get_rect(struct Texture *tex)
{
if (tex->opts.animation) {
/*
tex_anim_calc_uv(tex->anim);
struct glrect ret;
ret.s0 = tex->anim.uv.x;
ret.s1 = tex->anim.uv.x + tex->anim.uv.w;
ret.t0 = tex->anim.uv.y;
ret.t1 = tex->anim.uv.y + tex->anim.uv.h;
*/
return runit;
} else {
return runit;
}
return runit;
}
void tex_bind(struct Texture *tex)
{
glActiveTexture(GL_TEXTURE0);