🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Android Native Handling Orientation Change

Started by
0 comments, last by D.V.D 4 years, 3 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