mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[cogl-texture] Fix order of tex coords when compensating for waste
When drawing a texture with waste in _cogl_multitexture_unsliced_quad it scales the texture coordinates so that the waste is not included. However the formula was the wrong way around so it was calculating as if the texture coordinates are ordered x1,x2,y1,y2 but it is actually x1,y1,x2,y2.
This commit is contained in:
parent
561c441241
commit
d7c275f5e5
@ -2519,9 +2519,9 @@ _cogl_multitexture_unsliced_quad (float x_1,
|
||||
out_tex_coords[0] =
|
||||
out_tex_coords[0] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[1] =
|
||||
out_tex_coords[1] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[1] * (y_span->size - y_span->waste) / y_span->size;
|
||||
out_tex_coords[2] =
|
||||
out_tex_coords[2] * (y_span->size - y_span->waste) / y_span->size;
|
||||
out_tex_coords[2] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[3] =
|
||||
out_tex_coords[3] * (y_span->size - y_span->waste) / y_span->size;
|
||||
|
||||
|
@ -2634,9 +2634,9 @@ _cogl_multitexture_unsliced_quad (float x1,
|
||||
out_tex_coords[0] =
|
||||
out_tex_coords[0] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[1] =
|
||||
out_tex_coords[1] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[1] * (y_span->size - y_span->waste) / y_span->size;
|
||||
out_tex_coords[2] =
|
||||
out_tex_coords[2] * (y_span->size - y_span->waste) / y_span->size;
|
||||
out_tex_coords[2] * (x_span->size - x_span->waste) / x_span->size;
|
||||
out_tex_coords[3] =
|
||||
out_tex_coords[3] * (y_span->size - y_span->waste) / y_span->size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user