CAOpenGLLayer not rendering on headless Mac
| Originator: | ewmailing | ||
| Number: | rdar://10388102 | Date Originated: | 2011-11-02 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.7/10.6 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: I've been working with DTS trying to use CAOpenGLLayer effectively. (Follow-Up: 165216028) I am rendering to an offscreen FBO and trying to then render it in the drawInContext: callback of CAOpenGLLayer. This works perfectly fine on for me except when there is no display connected to the Mac. In the headless Mac case, I get no rendering/ DTS seems to think this is a specific bug to CAOpenGLLayer (but not NSOpenGLView) and asked me to file a bug. With my real program, I do notice that on Lion, if I kick into fullscreen mode, I start to get things rendered. Also, if I do weird things to my window (programatic reshape) which force complicated redraws in my engine, I sometimes get a single frame rendered to the screen which then remains stuck until I do it again or switch to fullscreen. Steps to Reproduce: Attached is a demo program DTS originally sent to me. It is tweaked a little, but I think it is mostly the same and never worked with offscreen rendering. I was hoping to reproduce the Lion fullscreen effect with it, but was not able to. Still, I think you will be able to see the fundamental drawing problem. It should draw a spinning diamond on the screen under normal circumstances. To reproduce the problem, detach all displays from your computer. (I use a Mac Mini mid 2010.) Then reboot. Then run the program. Expected Results: You should see a spinning diamond. Actual Results: I think you either see a black window or a red window. I can't remember which. I think the color might be the glClearColor. Regression: Both Snow Leopard and Lion have problems. On Snow Leopard, my pixel format is rejected if I request accelerated and no recovery, and omit kCGLPFARemotePBuffer and my programs eventually crash, but it is accepted on Lion. On Snow Leopard, if I try a fallback with kCGLPFARemotePBuffer (instructed by DTS), I avoid a crash, but get no rendering. Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!