openframeworks / openframeworks/openFrameworks
ofFbo not compatible with presentViewController on iOS
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
tested on 0.9.3 and master, based on example iosNativeExample :
- use ofFbo to draw the image in ImageApp
- ofFbo fbo; in ImageApp.h
- fbo.allocate(image.getWidth(),image.getHeight()); at the end of ImageApp::setup()
- fbo.begin(); image.draw(0, 0); fbo.end(); at the end of ImageApp::update()
- fbo.draw(x,y,image.getWidth(),image.getHeight()); instead of image.draw(x, y); in ImageApp::draw()
http://pastebin.com/raw/xLLcNDPi - use presentViewController in MyAppViewController button4Pressed
- [self.parentViewController presentViewController:viewController animated:YES completion:nil];
http://pastebin.com/raw/W25JXyA3
When tested on iPhone 6 plus ios 9.1 or 9.3.1, and on simulators, pressing on Image button in main screen leads to a gray screen (nothing displayed).
When commenting the usage of ofFbo, the image display just fine (as well as all indicators of the test).
The minimal change to reproduce it is to have to call ofFbo::begin() and ofFbo::end() in update to reproduce the problem.
The problem can be reproduced with all 4 cases of this example.
If using the regular NavigationViewController pushController in button4Pressed, ofFbo usage works.
OpenGL ES1 or ES2 : no impact on bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the iosNativeExample using ImageApp and MyAppViewController, with ofFbo::begin() and ofFbo::end() in update and presentViewController in button4Pressed. Compare this with the working pushController path and verify behavior on the listed iOS devices or simulators. Done means the image and indicators display after presentation while retaining ofFbo usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ios
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100