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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
New Contributor
gamaral
Posts: 2
Registered: ‎12-11-2012
My Carrier: Airplane

Recreating application window

I'm working on porting my game engine over to BB10 and I noticed that if I recreate the application window, it goes behind the UI (I can see my game running if I restart the device for example). I tried changing the ZORDER and specifically making it VISIBLE, but so far nothing.

 

I'm guessing maybe the application window is automatically added to some group after creation, but I have no idea. :3

 

I've considered creating a dummy application window and using a child window as my app window to workaround this issue, but I would much rather stick with just a single window.

 

Anyway, ideas welcome!

G

gamaral
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 541
Registered: ‎11-29-2011
My Carrier: other

Re: Recreating application window

is your UI in a child window?

I think destroying and recreating the parent (application) window is probably a bad thing, and navigator will probably get angry :smileyhappy:

I would suggest that you consider making all of your dynamic windows be children of the main application window.  You can even create that main window with 0 buffers if you want to save on memory, not have to deal with posting, etc.

 

Cheers,

Sean

Please use plain text.
New Contributor
gamaral
Posts: 2
Registered: ‎12-11-2012
My Carrier: Airplane

Re: Recreating application window

Well I found a way to worked around the issue, I keep the app window, and I just reset most of the internals, that worked perfectly.

 

If anybody is interested:

 

https://github.com/gamaral/marshmallow_h/blob/master/src/graphics/opengl/viewport-qnx.cpp

gamaral
Please use plain text.