Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Juyung Seo 8501a5174e elm glview: Changed Elm_GLView_Func callback function typedef to
Elm_GLView_Func_Cb according to EFL coding convention.


SVN revision: 61587
2011-07-22 11:31:06 +00:00
Daniel Juyung Seo 3a0636d1f1 elm: Removed trailing whitespaces.
SVN revision: 60952
2011-07-03 07:49:02 +00:00
Daniel Juyung Seo 0349ab98ce elm: Fixed wrong vim formatting.
SVN revision: 60714
2011-06-27 02:54:41 +00:00
Carsten Haitzler be21f7e4ea Upon reviewing the elm_glview, I've realized a few issues and mistakes that i've
made originally so I've made some changes/ updates to elm_glview

1.)  GL Resource Deletion in ELM_GLView

In order to delete GL resources, the current approach simply registered a
delete callback to the GLView object and handled resource deletion there.
Unfortunately, using the delete callback did not guarantee the glview context to be
current.  In order to guarantee that the current context was the glview context,
the make_current call needs to be called explicitly.  Since we were hiding all the
make current details in elm_glview, i've decided to add an API that registers a
delete callback function. I know that this may seem redundant since there is already
a delete callback that you can register with glview objects. Unfortunately, this is the
only option that we have apart from exposing make_current, which is something that
went again what we are trying to do with elm_glview.

Since adding delete callback alone seemed a little out of place, i've taken the liberty
to add other callback functions to make it seem consistent.

void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func func);
void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func func);
void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func func);

resize callback can be controversial as well but I want to argue that adding this callback
makes the render function a lot cleaner.  To handle resize differently, the user in
render function needs to manually compare and see if the size has changed, and
then handle the cases.  Doing all of this internally once makes the developers life
a lot easier in my opinion.

these callback functions do make the render function a lot cleaner. You can check
out the updated test_glview.c or newly added test_glview_simple.

2.) Minor bug fixes/changes

elm_glview_scale_policy_set() was supposed to be elm_glview_resize_policy_set()
but it somehow evaded our reviews.  That has been fixed.

Also, in _glview_resize, after updating the surface, it was explicitly calling the
render function.  It is actually unnecessary here and calling it here will cause
problems if resize gets called before everything else is setup properly.  So that has
been commented out.

3.) test_glview & test_glview_simple

elementary_test case for glview has been updated to reflect the api changes.
when you run the elmentary_test, you need to make sure that you set
ELM_ENGINE=gl as glview currently only runs on gl backend.

test_glview runs the gears example.  For testing purposes I've included a simple
glview test case that renders a triangle and changing background color.

             


SVN revision: 60517
2011-06-20 10:55:02 +00:00
Daniel Juyung Seo 913fb058ea Elementary glview: Fixed formatting.
Followed E coding style. Refer http://trac.enlightenment.org/e/wiki/ECoding. I have no idea about struct initialization though.
1. Fixed indentation.
2. Removed unnecessary lines.
3. Etc...


SVN revision: 59921
2011-06-03 17:58:08 +00:00
Daniel Juyung Seo d9bf79c0f7 Elementary glview: Added 'const' to the obj parameters in elm_xxx_get() APIs.
SVN revision: 59920
2011-06-03 17:48:45 +00:00
Daniel Juyung Seo 8e91672a42 Elementary: Removed trailing whitespaces.
Keep removing trailing whitespaces :)


SVN revision: 59919
2011-06-03 17:44:24 +00:00
Sung W. Park 7e01afebe7 From: "Sung W. Park" <sungwoo@gmail.com>
Subject: Re: [E-devel] [RFC] ELM GLView

Elementary GLview wiedget giving simplified access to do opengl
drawing in a widget in elm so you pretty much do no work to set it up
and just provide a render function to draw the contents when it needs
drawing. Thanks to Sungwoo Park and Samsung



SVN revision: 59909
2011-06-03 07:09:25 +00:00