Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
It seems that OpenTK.Platform.iPhoneOS.iPhoneOSGameView.WillMoveToWindow calls DestroyFrameBuffer. I don't think this should happen. Here's why...
I have an OpenGL (OpenTK) based game. I'm adding social network integration. After finishing a level the user can post their high score to Facebook. This brings up the Facebook sharing UI. After that's dismissed OpenTK.Platform.iPhoneOS.iPhoneOSGameView.WillMoveToWindow is called, that in turn calls DestroyFrameBuffer, but there's no reason to destroy it, it's still perfectly usable.
I've put into place a work around in my game where I override DestroyFrameBuffer in my subclass of iPhoneOSGameView and then do nothing (instead of calling base.DestroyFrameBuffer).
Radek, can you comment on this?
I checked the source and WillMoveToWindow checks whether the Window or Layer has changed and recreates the frame buffer when it changed. Which looks like a right thing to do. Rolf, does it sound right from iOS point of view?
Rainer, could you provide a simple test case which demonstrates the behavior you see?
BTW, the source is here, if you would like to look at it. https://github.com/mono/opentk/blob/master/Source/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs#L836
@Radek, I will try to provide a simple test case. The project I'm seeing this on is pretty big, though, so I'm not sure how quickly I'll be able to strip it down.
It's interesting that my fix, to not call base.DestroyFrameBuffer() in my override of it, fixed this problem. Looking at the source code that would mean that DestroyFrameBuffer does nothing in this case, but after that CreateFrameBuffer is still called.
The WillMoveToWindow implementation looks sane, so yes, I think it would be better to have a specific test project to see exactly how this can be improved.
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!