What is this rectangle for in test_map? Daniel Juyung Seo (SeoZ)
On Fri, Oct 28, 2011 at 8:08 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > From: "Sung W. Park" <sung...@gmail.com> > Subject: [E-devel] [E-Devel][Patch] Evas GL Color Format Enum change > (and ElmGLview changes accordingly) > > I'm submitting a patch that changes the color format for Evas GL. > > When I first wrote Evas_GL, I just had EVAS_GL_RGB_8 and EVAS_GL_RGBA_8 and > etc > but it was misleading for some people. It was more of a filler since I > couldn't decide on > a name. I'm finally changing it to make it more clear. > > > > Author: raster > Date: 2011-10-28 04:08:23 -0700 (Fri, 28 Oct 2011) > New Revision: 64491 > Trac: http://trac.enlightenment.org/e/changeset/64491 > > Modified: > trunk/elementary/src/bin/test_map.c trunk/elementary/src/lib/elm_glview.c > trunk/evas/src/lib/Evas_GL.h > trunk/evas/src/modules/engines/gl_x11/evas_engine.c > > Modified: trunk/elementary/src/bin/test_map.c > =================================================================== > --- trunk/elementary/src/bin/test_map.c 2011-10-28 10:28:00 UTC (rev 64490) > +++ trunk/elementary/src/bin/test_map.c 2011-10-28 11:08:23 UTC (rev 64491) > @@ -711,7 +711,7 @@ > void > test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void > *event_info __UNUSED__) > { > - Evas_Object *win, *bg, *map; > + Evas_Object *win, *bg, *map, *vbox, *r; > int idx = 0; > > win = elm_win_add(NULL, "map", ELM_WIN_BASIC); > @@ -723,6 +723,18 @@ > elm_win_resize_object_add(win, bg); > evas_object_show(bg); > > + vbox = elm_box_add(win); > + elm_win_resize_object_add(win, vbox); > + evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > + evas_object_show(vbox); > + > + r = evas_object_rectangle_add(evas_object_evas_get(win)); > + evas_object_color_set(r, 20, 40, 60, 255); > + evas_object_size_hint_min_set(r, 200, 200); > + evas_object_show(r); > + evas_object_size_hint_fill_set(r, EVAS_HINT_FILL, EVAS_HINT_FILL); > + elm_box_pack_end(vbox, r); > + > map = elm_map_add(win); > if (map) > { > @@ -736,7 +748,9 @@ > printf("]\n"); > > evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > - elm_win_resize_object_add(win, map); > + evas_object_size_hint_fill_set(map, EVAS_HINT_FILL, EVAS_HINT_FILL); > + elm_box_pack_end(vbox, map); > +// elm_win_resize_object_add(win, map); > evas_object_data_set(map, "window", win); > > // > > Modified: trunk/elementary/src/lib/elm_glview.c > =================================================================== > --- trunk/elementary/src/lib/elm_glview.c 2011-10-28 10:28:00 UTC (rev > 64490) > +++ trunk/elementary/src/lib/elm_glview.c 2011-10-28 11:08:23 UTC (rev > 64491) > @@ -219,7 +219,7 @@ > Evas_Object *obj; > Evas *e; > Widget_Data *wd; > - Evas_GL_Config cfg = { EVAS_GL_RGB_8, > + Evas_GL_Config cfg = { EVAS_GL_RGB_888, > EVAS_GL_DEPTH_NONE, > EVAS_GL_STENCIL_NONE }; > > @@ -295,14 +295,14 @@ > { > ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; > Widget_Data *wd = elm_widget_data_get(obj); > - Evas_GL_Config cfg = { EVAS_GL_RGBA_8, > + Evas_GL_Config cfg = { EVAS_GL_RGBA_8888, > EVAS_GL_DEPTH_NONE, > EVAS_GL_STENCIL_NONE }; > if (!wd) return EINA_FALSE; > > // Set the configs > if (mode & ELM_GLVIEW_ALPHA) > - cfg.color_format = EVAS_GL_RGBA_8; > + cfg.color_format = EVAS_GL_RGBA_8888; > > if (mode & ELM_GLVIEW_DEPTH) > cfg.depth_bits = EVAS_GL_DEPTH_BIT_24; > > Modified: trunk/evas/src/lib/Evas_GL.h > =================================================================== > --- trunk/evas/src/lib/Evas_GL.h 2011-10-28 10:28:00 UTC (rev 64490) > +++ trunk/evas/src/lib/Evas_GL.h 2011-10-28 11:08:23 UTC (rev 64491) > @@ -18,29 +18,27 @@ > > typedef enum _Evas_GL_Color_Format > { > - EVAS_GL_RGB_8, // 8 bits per channel > - EVAS_GL_RGBA_8, > - EVAS_GL_RGB_32, // 32-bits per channel > - EVAS_GL_RGBA_32, > + EVAS_GL_RGB_888 = 0, > + EVAS_GL_RGBA_8888 = 1 > } Evas_GL_Color_Format; > > typedef enum _Evas_GL_Depth_Bits > { > - EVAS_GL_DEPTH_BIT_8, > - EVAS_GL_DEPTH_BIT_16, > - EVAS_GL_DEPTH_BIT_24, > - EVAS_GL_DEPTH_BIT_32, > - EVAS_GL_DEPTH_NONE > + EVAS_GL_DEPTH_NONE = 0, > + EVAS_GL_DEPTH_BIT_8 = 1, > + EVAS_GL_DEPTH_BIT_16 = 2, > + EVAS_GL_DEPTH_BIT_24 = 3, > + EVAS_GL_DEPTH_BIT_32 = 4, > } Evas_GL_Depth_Bits; > > typedef enum _Evas_GL_Stencil_Bits > { > - EVAS_GL_STENCIL_BIT_1, > - EVAS_GL_STENCIL_BIT_2, > - EVAS_GL_STENCIL_BIT_4, > - EVAS_GL_STENCIL_BIT_8, > - EVAS_GL_STENCIL_BIT_16, > - EVAS_GL_STENCIL_NONE > + EVAS_GL_STENCIL_NONE = 0, > + EVAS_GL_STENCIL_BIT_1 = 1, > + EVAS_GL_STENCIL_BIT_2 = 2, > + EVAS_GL_STENCIL_BIT_4 = 3, > + EVAS_GL_STENCIL_BIT_8 = 4, > + EVAS_GL_STENCIL_BIT_16 = 5, > } Evas_GL_Stencil_Bits; > > struct _Evas_GL_Config > @@ -98,7 +96,7 @@ > // config for the surface for evas_gl > Evas_GL_Config config = > { > - EVAS_GL_RGBA_8, > + EVAS_GL_RGBA_8888, > EVAS_GL_DEPTH_NONE, > EVAS_GL_STENCIL_NONE > }; > > Modified: trunk/evas/src/modules/engines/gl_x11/evas_engine.c > =================================================================== > --- trunk/evas/src/modules/engines/gl_x11/evas_engine.c 2011-10-28 10:28:00 > UTC (rev 64490) > +++ trunk/evas/src/modules/engines/gl_x11/evas_engine.c 2011-10-28 11:08:23 > UTC (rev 64491) > @@ -2778,20 +2778,14 @@ > // Also initialize pixel format here as well... > switch(cfg->color_format) > { > - case EVAS_GL_RGB_8: > + case EVAS_GL_RGB_888: > sfc->rt_fmt = GL_RGB; > sfc->rt_internal_fmt = GL_RGB; > break; > - case EVAS_GL_RGBA_8: > + case EVAS_GL_RGBA_8888: > sfc->rt_fmt = GL_RGBA; > sfc->rt_internal_fmt = GL_RGBA; > break; > - case EVAS_GL_RGB_32: > - // Only supported on some hw > - // Fill it in later... > - case EVAS_GL_RGBA_32: > - // Only supported on some hw > - // Fill it in later... > default: > ERR("Invalid Color Format!"); > return 0; > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now! http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel