mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-10 05:18:13 +00:00
Use normalized texture coordinates
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user