forked from enlightenment/efl
much better fix to invalid uv coords with new map render code
this fixes the d81d1337b0
fix to do it
in the inner loop so uu and vv stay valid. still not a great fix but
better than chashes.
This commit is contained in:
parent
c10dfc3bca
commit
22081ada26
|
@ -396,9 +396,6 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst,
|
|||
dx = 1 - (_xa - x1);
|
||||
u = _ua + dx * _dudx;
|
||||
v = _va + dx * _dvdx;
|
||||
// FIXME: sometimes u and v are < 0 - don'tc crash
|
||||
if (u < 0) u = 0;
|
||||
if (v < 0) v = 0;
|
||||
|
||||
if (col_blend)
|
||||
{
|
||||
|
@ -419,6 +416,9 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst,
|
|||
{
|
||||
uu = (int) u;
|
||||
vv = (int) v;
|
||||
// FIXME: sometimes u and v are < 0 - don'tc crash
|
||||
if (uu < 0) uu = 0;
|
||||
if (vv < 0) vv = 0;
|
||||
|
||||
//Range exception handling
|
||||
//OPTIMIZE ME, handle in advance?
|
||||
|
|
Loading…
Reference in New Issue