1

I currently have an app that, on one view controller, has a subview which in turn has an openGL eagl layer that I render video to. My problem is that presently, whenever this view loads in or unloads (whether because you open a view in a deeper layer or close that view to open a different view), the layer turns green.

I have already set the actual UIView's background to be grey. I've also tried changing the glClearColor(0.5f, 0.5f, 0.5f, 1.0f) and a few other variations (setting the alpha channel to 0, setting the clear color to all red, setting the eaglLayer.opaque to NO, etc). None of my changes seem to make any difference and I always get the flash of green when the view appears/disappears. I've also tried calling a function which sets the eaglLayer.opaque = NO and calls glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) on viewWillDisappear. This also seems to have no affect.

I'm not sure what else I can do that would help with the situation and I have no idea why I'm getting the green frame(s). If anyone has any ideas, it'd be greatly appreciated.

Doc
  • 1,480
  • 2
  • 16
  • 28
  • The green, or sometimes purple, that you get from your eagl view is often a case of a misconfigured buffer. Or this si what I have come across in the past. I am just wondering, in the code where you set up and tear down your eaglView, is there a possibility that the view is still showing, and briefly renders a broken framebuffer or something like that? eg as you tear down the framebuffer, it is still trying to render it. – Bergasms Nov 13 '12 at 21:40
  • During my function call to leave the view, I already call my stopAnimation function to stop rendering frames. I also checked and tossed function calls in viewWillDisappear as well. Issue still persists, so I don't think that that is the issue. – Doc Nov 16 '12 at 14:38

0 Answers0