openframeworks / openframeworks/openFrameworks
ofxiPhone - Move openGL to its own thread
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Related forum post: http://forum.openframeworks.cc/index.php/topic,7053.0.html
From what I understand, it's best to leave the mainThread for UIKit elements and move openGL and other things to another thread. Currently, if there's a lot of drawing then the UIKit elements are delayed and can even pause the update/draw methods entirely. Moving the drawing to it's own thread should help with this.
I'm still testing, but this looks like it could be a good candidate for core integration. It has examples of threaded, single (what we currently use), and GCD (which I think is iOS 4.0 only) openGL implementation: https://github.com/Volcore/LimbicGL In my early tests, it does fix any pausing of the update/draw with the threaded example (haven't tried the others). I could use some help though trying to integrate this into OF properly.
The main example classes are here: https://github.com/Volcore/LimbicGL/tree/master/limbicgl/drivers
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 with the related forum post and the LimbicGL repository, especially the example classes under limbicgl/drivers. Compare its threaded, single-threaded, and GCD implementations with openFrameworks' iPhone rendering entry points. Done means a core integration that preserves drawing behavior while preventing heavy rendering from pausing UIKit and update/draw activity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ios
- Domain
- computer-graphics, mobile-dev, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 22/100