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
Highlighted
Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink
Accepted Solution

Button, menu on top of OpenGL surface

[ Edited ]

I am working on a project which used OpenGL ES 1.1. Now I wanna place some Menus & Buttons there, looking a bit like a HUD.

 

What is the preferred way to do something like this?
I understand there'll probably be many games using this since it seems quiet natural.

 

Is it possible to use Qt on top of OpenGL surface?

 

Are there some Demo-Apps out there who do exactly this?

I searched for it, but couldn't really find anything that adressed this issue.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Button, menu on top of OpenGL surface

I don't think it is possible. Render your own UI with OpenGL. 

Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink

Re: Button, menu on top of OpenGL surface

Thanks for your reply.

 

Can you please explain what you mean by "own UI"?

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Button, menu on top of OpenGL surface

Own UI -> you want a Button.

Draw a rectangular with rounded corners, put some text in it.

In main event processing look listen for touch event. On touch event check whether a user touched within your Button boundaries, if yes change look of your button to Pressed (opional) and react to this Press event.

Yes that's a lot of work. I did it once for one app and it does require a lot of coding.

On a plus side once you develop this 'infrastructure' of your own UI then you can reuse it in your all apps.

Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink

Re: Button, menu on top of OpenGL surface

thanks a lot............ Smiley Happy