mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 10:48:28 +00:00
Use normalized texture coordinates
This commit is contained in:
parent
5828cc415a
commit
f73c1eff10
7 changed files with 13 additions and 19 deletions
|
@ -1085,8 +1085,8 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
|||
*(verts++) = v->color.a * inv255f;
|
||||
|
||||
if (texture) {
|
||||
*(verts++) = (v->tex_coord.x / texture->w) * texturedata->texw;
|
||||
*(verts++) = (v->tex_coord.y / texture->h) * texturedata->texh;
|
||||
*(verts++) = v->tex_coord.x * texturedata->texw;
|
||||
*(verts++) = v->tex_coord.y * texturedata->texh;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue