forked from enlightenment/efl
evas/wayland_egl: Workaround for map perspective issues.
Account for the framespace offset on perspective fx and fy of each map point. This is just a workaround because I could not understand exactly why it is needed. When no perspective is used, the viewport is set to the size of the surface, and each map point seems to be used as is, with no adjustment being needed. However, when the map is not flat (perspective is used), a more complex math is used to find the glViewport size. It ends up being bigger, but there are some offsets used to compensate that, gc->shared->ax/y, which are added to each vertex before pushing them. Thus, it seems to me that the framespace offset should not be added to them, but things are weird if this is not done. Anyway, I just added those offsets, and it should not impact on gl_x11 since it's not using framespace, and software engines don't seem to implement perspective anyway, so it all should be fine. If anyone understands better what's going on here, please make a proper fix or at least contact me to explain the problem, and maybe I can fix it by myself.
This commit is contained in:
parent
2d8bef3c25
commit
383bb37e61
|
@ -1294,8 +1294,8 @@ evas_object_map_update(Evas_Object *eo_obj,
|
|||
pt->x = (lround(p->x) + x) * FP1;
|
||||
pt->y = (lround(p->y) + y) * FP1;
|
||||
pt->z = (lround(p->z) ) * FP1;
|
||||
pt->fx = p->px;
|
||||
pt->fy = p->py;
|
||||
pt->fx = p->px + obj->layer->evas->framespace.x;
|
||||
pt->fy = p->py + obj->layer->evas->framespace.y;
|
||||
pt->fz = p->z;
|
||||
if ((uvw == 0) || (imagew == 0)) pt->u = 0;
|
||||
else pt->u = ((lround(p->u) * imagew) / uvw) * FP1;
|
||||
|
|
Loading…
Reference in New Issue