Advertisement

Android Native Handling Orientation Change

Started by March 26, 2020 01:36 AM
0 comments, last by D.V.D 4 years, 5 months ago

Hey All,

I've been working on a android game and I set it up as entirely a native activity using native app glue. When my app gets a configuration change event or window resize event, I query EGL/Native Window for the new render width/height. My expectation is that when I rotate my phone, the width and height values will swap but they do not change and my rendering surface gets corrupted. My question is, do I have to recreate the native window or EGL surface or EGLContext or all of the above on orientation change? I would hope I don't have to recreate the EGLContext since then I'd have to reupload all my assets again, but I can't find any pointers on how to handle this correctly.

This topic is closed to new replies.

Advertisement