openframeworks / openframeworks/openFrameworks
Make ProjectGenerator for iOS release automatically generate main.mm using ofAppiOSWindow
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hey,
in a rather lengthy debugging session (github issue, forum post) I figured out some rendering issues on an iOS openframeworks project that uses 3D.
It turns out that the ProjectGenerator by defaults creates this main.mm
#include "ofMain.h"
#include "ofApp.h"
int main(){
ofSetupOpenGL(1024,768,OF_FULLSCREEN); // <-------- setup the GL context
ofRunApp(new ofApp());
}
My issue got resolved by using the ofAppiOSWindow setup, like so:
#include "ofMain.h"
#include "ofApp.h"
int main(){
ofAppiOSWindow * iOSWindow = new ofAppiOSWindow();
iOSWindow->enableDepthBuffer();
ofSetupOpenGL(iOSWindow, 1024, 768, OF_FULLSCREEN);
ofRunApp(new ofApp);
}
Despite there also being the iOSWindow->enableDepthBuffer(); which might not be needed for all projects, shouldn't the iOS ProjectGenerator use this form using ofAppiOSWindow?
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
Start in the iOS ProjectGenerator template that produces main.mm and compare its generated setup with the ofAppiOSWindow example in this issue. Determine the appropriate default window setup, including whether depth-buffer enabling belongs in the template, then verify that newly generated iOS projects contain the intended main.mm.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ios
- Domain
- mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100