mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 19:12:24 -05:00
Merge pull request #24715 from dragmz/patch-4
Fix negative size rectangle drawing in GLES2
This commit is contained in:
commit
d930c909f2
1 changed files with 3 additions and 4 deletions
|
@ -465,12 +465,11 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
||||||
state.canvas_shader.use_material((void *)p_material);
|
state.canvas_shader.use_material((void *)p_material);
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2 abs_size = r->rect.size.abs();
|
|
||||||
Vector2 points[4] = {
|
Vector2 points[4] = {
|
||||||
r->rect.position,
|
r->rect.position,
|
||||||
r->rect.position + Vector2(abs_size.x, 0.0),
|
r->rect.position + Vector2(r->rect.size.x, 0.0),
|
||||||
r->rect.position + abs_size,
|
r->rect.position + r->rect.size,
|
||||||
r->rect.position + Vector2(0.0, abs_size.y),
|
r->rect.position + Vector2(0.0, r->rect.size.y),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (r->rect.size.x < 0) {
|
if (r->rect.size.x < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue