To Corona: Why not allows us to add objects above native objects?

It is known that native objets (maps, video, textFields,…) are always displayed on top of everything on our Corona screen.

My question to Corona is: Why don’t you allow us to add objects (display, widgets,…) to be above these native objects?

Based on my short experience with Corona Enterprise (android), I understand that all Corona objects are added inside the same view. But the Corona Framework already has a “overlay View” that is above the Corona View.

Why don’t you allows us to choose if we want add our Corona objects to that overlay view? This is simple way to solve a problem that hurts a lot of Pro developers.

Here is an example of how I think it could work:

local myNormalGroup = display.newGroup()  -- this is a normal group that we use today on Corona local myOverlayGroup = display.newGroup({addInOverlayView = true})  -- this would add that new group to the overlay view, and so every display objects added to this group would always be on top of the normalGroup above

Looking forward to your feedback on that.

Except all Corona display objects are rendered to one native OpenGL view (ie: the rendering surface).  If you display the OpenGL view on top, then you wouldn’t be able to see the native objects, such as text fields, beneath it.

Can’t you have an OpenGL surface with transparent background?

I think on iOS that may be possible.  I don’t know about the other platforms.  I know the Android OS has buggy rendering behavior when it comes to threaded out SurfaceView derived classes (like their OpenGLSurfaceView) where it’ll sometimes render at the wrong z-order after a suspend/resume.  It all depends on how the operating system’s UI framework handles compositing the UI with OpenGL.  Especially since native UI is CPU bound and OpenGL is GPU bound.  It all gets rendered to the GPU in the end, but still, it depends on how the OS handles it.

And you definitely don’t want to display more than one OpenGL view onscreen (such as on the bottom and on the top) because that would cause a severe performance issue.  Plus, on Android, there is a huge design issue on Google’s end where 1 OpenGL view will clobber the rendering of another if both are used at the same time.

Feel free to play with this via Corona Enterprise or CoronaCards if you want.

This is kind of old but it appears they were able to have the OpenGL transparent background: http://stackoverflow.com/questions/2034822/android-opengl-es-transparent-background

I know that I can do it using Corona Enterprise or CoronaCards, but it is not the same experience of doing it only using Corona Pro.

I find really frustrating that I cannot add like a simple small “my location” button above a map,  or a play button above a video. They are simple things that users are familiar to have and impacts our apps user experience.

Except all Corona display objects are rendered to one native OpenGL view (ie: the rendering surface).  If you display the OpenGL view on top, then you wouldn’t be able to see the native objects, such as text fields, beneath it.

Can’t you have an OpenGL surface with transparent background?

I think on iOS that may be possible.  I don’t know about the other platforms.  I know the Android OS has buggy rendering behavior when it comes to threaded out SurfaceView derived classes (like their OpenGLSurfaceView) where it’ll sometimes render at the wrong z-order after a suspend/resume.  It all depends on how the operating system’s UI framework handles compositing the UI with OpenGL.  Especially since native UI is CPU bound and OpenGL is GPU bound.  It all gets rendered to the GPU in the end, but still, it depends on how the OS handles it.

And you definitely don’t want to display more than one OpenGL view onscreen (such as on the bottom and on the top) because that would cause a severe performance issue.  Plus, on Android, there is a huge design issue on Google’s end where 1 OpenGL view will clobber the rendering of another if both are used at the same time.

Feel free to play with this via Corona Enterprise or CoronaCards if you want.

This is kind of old but it appears they were able to have the OpenGL transparent background: http://stackoverflow.com/questions/2034822/android-opengl-es-transparent-background

I know that I can do it using Corona Enterprise or CoronaCards, but it is not the same experience of doing it only using Corona Pro.

I find really frustrating that I cannot add like a simple small “my location” button above a map,  or a play button above a video. They are simple things that users are familiar to have and impacts our apps user experience.