openframeworks / openframeworks/openFrameworks
ofPush/Pop()
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Cinder has ci::gl::push/popModelView() and ci::gl::push/popProjection() which are wrapped by ci::gl::push/popMatrices
I think this kind of abstraction is great: starting by teaching people that they need to maintain camera states with push/popMatrices, then later showing them how to break that into parts (modelView, and projection).
What if we took this a step further with OF, and used ofPush/Pop() to mean ofPush/PopStyle() + ofPush/PopMatrix()?
Right now people wrap drawing code with one call or the other, but once they add an ofSetColor() or ofTranslate() they sometimes forget to add the other push/pop. We could encourage people to avoid this issue, and simplify code at the same time.
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 by reviewing the existing ofPush/PopStyle() and ofPush/PopMatrix() entry points, along with the Cinder push/popMatrices comparison in the issue. Determine the intended API and compatibility implications before changing anything; done requires an agreed design and corresponding implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100