summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_generic
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-02-05 15:34:25 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-09 22:03:26 +0100
commit00c2451656167dc4a42dfa1ef84fa7f21e5dc48e (patch)
tree87246e5738828372a7e5ba4a14090295ffe5e9ac /src/modules/evas/engines/gl_generic
parentd45d7d3f224e00f3f4bf56c0f1e06910aa9c2d61 (diff)
evas: Evas_3D - ColorPick mechanism finding node and mesh in scene.
Summary: Added additional texture and framebuffer for rendering meshes to it. Added function that return OpenGL id additional texture Added function that return color from target texture by mouse pick coordinates Added function that render need meshes to target texture Added engine wrappers for possibility force render to texture @feature Reviewers: Hermet, raster, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1811 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index e280fddf91..082ac0d921 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1836,6 +1836,35 @@ eng_drawable_scene_render(void *data, void *drawable, void *scene_data)
1836 e3d_drawable_scene_render(drawable, renderer, scene_data); 1836 e3d_drawable_scene_render(drawable, renderer, scene_data);
1837} 1837}
1838 1838
1839static int
1840eng_drawable_texture_color_pick_id_get(void *drawable)
1841{
1842 return e3d_drawable_texture_color_pick_id_get((E3D_Drawable *)drawable);
1843}
1844
1845static double
1846eng_drawable_texture_pixel_color_get(GLuint tex EINA_UNUSED, int x, int y, void *drawable)
1847{
1848 return e3d_drawable_texture_pixel_color_get(tex, x, y, drawable);
1849}
1850
1851static Eina_Bool
1852eng_drawable_scene_render_to_texture(void *data, void *drawable, void *scene_data)
1853{
1854 Evas_Engine_GL_Context *gl_context;
1855 Render_Engine_GL_Generic *re = data;
1856 E3D_Renderer *renderer = NULL;
1857
1858 re->window_use(re->software.ob);
1859 gl_context = re->window_gl_context_get(re->software.ob);
1860 evas_gl_common_context_flush(gl_context);
1861
1862 eng_context_3d_use(data);
1863 renderer = eng_renderer_3d_get(data);
1864
1865 return e3d_drawable_scene_render_to_texture((E3D_Drawable *)drawable, renderer, scene_data);
1866}
1867
1839static void * 1868static void *
1840eng_texture_new(void *data EINA_UNUSED) 1869eng_texture_new(void *data EINA_UNUSED)
1841{ 1870{
@@ -2045,6 +2074,10 @@ module_open(Evas_Module *em)
2045 2074
2046 ORD(drawable_scene_render); 2075 ORD(drawable_scene_render);
2047 2076
2077 ORD(drawable_texture_color_pick_id_get);
2078 ORD(drawable_texture_pixel_color_get);
2079 ORD(drawable_scene_render_to_texture);
2080
2048 ORD(texture_new); 2081 ORD(texture_new);
2049 ORD(texture_free); 2082 ORD(texture_free);
2050 ORD(texture_data_set); 2083 ORD(texture_data_set);