Skip to main content

Is it possible to switch focus from one GLKview to another without reloading everything?



I am making an opengl 2.0 based game for iPad where I have added support for external displays. I want the game to be able to hot-swap between the local display and the external display.





The issue I am experiencing is that as soon as I get a DrawInRect call to a newly created GLKview, belonging to a newly attached display, it seems all the shader programs and textures I set up in the old GLKview are no longer valid for the new GLKview.





Will I need to recompile the shaders and reload all textures for new GLKview's? Or is there a better way to do it?





I would really like to avoid having the game pause for 5-10 seconds while loading textures to the new display, especially since they are in fact already loaded and should be available somehow?





Is there a way to transfer/share these data?


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?