Use normalized texture coordinates

This commit is contained in:
Sylvain authored and Sylvain Becker committed 2021-08-19 00:10:59 +02:00
1 parent 5828cc415a
commit f73c1eff10
7 files changed
+13 -19

No files matched your search

+1 -1
View File
@@ -3369,7 +3369,7 @@ SDL_RenderGeometry(SDL_Renderer *renderer,
if (texture) {
for (i = 0; i < num_vertices; ++i) {
if (vertices[i].tex_coord.x < 0 || vertices[i].tex_coord.y < 0 || vertices[i].tex_coord.x >= texture->w || vertices[i].tex_coord.y >= texture->h) {
if (vertices[i].tex_coord.x < 0.0f || vertices[i].tex_coord.y < 0.0f || vertices[i].tex_coord.x > 1.0f || vertices[i].tex_coord.y > 1.0f) {
return SDL_SetError("Values of 'vertices' out of bounds");
}
}