openframeworks / openframeworks/openFrameworks

ofxiPhone - Move openGL to its own thread

Open
#721 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

addon feature iOS
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.