Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell
Accepted Solution

OpenGL + mmr video playback and touch events.

Hello BB Native forums,

 

We have an openGL app that renders video using mmrenderer child window. OpenGL surface is transparent and renders some overlay elements above the video. It seems as though touch events are only transmitted when the happen on the non transparent portion of the OpenGL surface. Is there a way to catch all touch events in this scenario (perhaps from the child window)?

 

Thank you!

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: OpenGL + mmr video playback and touch events.

Hi there,


How are you going about capturing events on your OpenGL surface?


Martin

 

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: OpenGL + mmr video playback and touch events.

Hi Martin,

 

It's just a standard bps_screen event handling.

 

for(;:smileywink:
    {
        int rc = bps_get_event(&event, 0);

        if (rc == BPS_SUCCESS && event)
        {
            int domain = bps_event_get_domain(event);
            if (domain == screen_get_domain())
            .....

 

Thanks,

 

Stephane

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: OpenGL + mmr video playback and touch events.

Are you properly requesting events with "screen_request_events(...)" with the proper screen context?

 

Have you taken a look at the GoodCitizen OpenGL sample application? It shows how all events are received and process across the entire screen with a very similar use case;

 

Martin

 

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: OpenGL + mmr video playback and touch events.

Thanks Michel,

 

We were creating an unnecessary screen context when adding the mmr child window. Simply adding it to the main application's context works and events are now directed properly. Had we stuck to the original solution with 2 contexts, then we would have needed to redirect event request to the new context the redirect back to the old context after video playback.

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: OpenGL + mmr video playback and touch events.

Great!

 

Glad you got it working - let me know if you need anything else;

 

Martin

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: OpenGL + mmr video playback and touch events.

Realized I called you Michel instead of Martin. Probably had old time hockey on my mind.

Thanks again for your help Martin!

Please use plain text.