summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_canvas3d_mesh.c
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2016-03-15 12:49:33 -0700
committerCedric Bail <cedric@osg.samsung.com>2016-03-15 12:49:39 -0700
commit296e8c22b039fd5669ad95375733bf214b23d71e (patch)
tree1aee03de378e591cbe0039bbaaa1c4f4788a8459 /src/lib/evas/canvas/evas_canvas3d_mesh.c
parentcdb72864853d5c3d81148c7a5846f39300eb46dc (diff)
evas.canvas3d: support static LOD technic
Summary: Main flow: add several meshes(with different number of polygons) in one node, enable LOD for node, set boundary distances to choose need mesh depend on distance to the camera node, render only need mesh. Add API's enable lod in evas_canvas3d_node module and set boundary distance to module evas_canvas3d_mesh module Refactored function evas_canvas3d_node_mesh_collect to calculate distance. Refactored _scene_render to have possibility pass to the render only need LOD mesh. Reviewers: cedric, Hermet, raster Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3731 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/canvas/evas_canvas3d_mesh.c')
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index d19a1fc..606d399 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -133,6 +133,8 @@ _mesh_init(Evas_Canvas3D_Mesh_Data *pd)
133 pd->shadows_edges_filtering_level = 4; 133 pd->shadows_edges_filtering_level = 4;
134 pd->shadows_edges_size = 300.0; 134 pd->shadows_edges_size = 300.0;
135 pd->shadows_constant_bias = 0.00015; 135 pd->shadows_constant_bias = 0.00015;
136 pd->near_lod_boundary = 0.0;
137 pd->far_lod_boundary = 0.0;
136} 138}
137 139
138static inline void 140static inline void
@@ -1151,4 +1153,19 @@ _evas_canvas3d_mesh_convex_hull_data_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh
1151 return; 1153 return;
1152} 1154}
1153 1155
1156EOLIAN static void
1157_evas_canvas3d_mesh_lod_boundary_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
1158 Evas_Real near, Evas_Real far)
1159{
1160 pd->near_lod_boundary = near;
1161 pd->far_lod_boundary = far;
1162}
1163
1164EOLIAN static void
1165_evas_canvas3d_mesh_lod_boundary_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
1166 Evas_Real *near, Evas_Real *far)
1167{
1168 *near = pd->near_lod_boundary;
1169 *far = pd->far_lod_boundary;
1170}
1154#include "canvas/evas_canvas3d_mesh.eo.c" 1171#include "canvas/evas_canvas3d_mesh.eo.c"