I created two caeagllayers to display two independent OpenGL ES views, mainview and childview, which inherit UIView and override layerClass.
First, mainview runs CAEAGLLayer in the main thread, creates an eaglcontext, and uses cadisplaylink to refresh the view. CAEAGLLayer opaque = true for mainview.
The second childview is overlaid on the mainview. In a custom sub thread, create a caeagllayer and eaglcontext, then initialize the operation, and use cadisplaylink to refresh the view.
The whole process can run well on IOS simulator, but some exceptions will be displayed on real iphone11:
If childview's CAEAGLLayer opaque = true, after childview is created, I must touch the iPhone 11 screen before i can see OpenGLES, and then the interface displays normally.
If CAEAGLLayer opaque = false in childview, I can see the OpenGL view displayed without touch the screen, but there will be transparency problems in the interface display. If the translucent texture is displayed in childview, I can see the view displayed on mainview.
I hope I have clearly described the problem, so how can I modify it?
Thanks for any insights, examples, or suggestions。