Skip to main content
GameDev.net gamedev.net
🔒 Locked

Android Native Handling Orientation Change

Started by D.V.D Mar 26, 2020 at 1:36 AM 0 replies 3.1k views
Original Post
D.V.D
D.V.D

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.