forked from enlightenment/efl
GLView: Add API to get the Evas_GL
Before screaming "don't expose this", here's the reasoning: There will be a few new APIs in evas-gl (support pbuffer, ...) that require a pointer to the Evas_GL to be called. So, instead of exposing each and every one of these evas gl functions in a dummy wrapper in elm_glview, we just give access to the real pointer. GLView will always be a wrapper around evas_gl, because that's what it is by definition.
This commit is contained in:
parent
797e75bb4f
commit
706d2a28aa
|
@ -417,6 +417,12 @@ _elm_glview_changed_set(Eo *obj, Elm_Glview_Data *sd)
|
|||
ecore_idle_enterer_before_add((Ecore_Task_Cb)_render_cb, obj);
|
||||
}
|
||||
|
||||
EOLIAN static Evas_GL *
|
||||
_elm_glview_evas_gl_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd)
|
||||
{
|
||||
return sd->evasgl;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_glview_class_constructor(Eo_Class *klass)
|
||||
{
|
||||
|
|
|
@ -162,6 +162,23 @@ class Elm_Glview (Elm_Widget)
|
|||
return: Evas_GL_API *;
|
||||
}
|
||||
}
|
||||
evas_gl {
|
||||
get {
|
||||
/*@
|
||||
Get the internal Evas GL attached to this view.
|
||||
|
||||
@note The returned Evas_GL must not be destroyed as it is still owned
|
||||
by the view. But this pointer can be used then to call all the evas_gl_
|
||||
functions.
|
||||
|
||||
@since 1.12
|
||||
|
||||
@return The Evas_GL used by this GLView.
|
||||
|
||||
@ingroup GLView */
|
||||
return: Evas_GL *;
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
class.constructor;
|
||||
|
|
Loading…
Reference in New Issue