openframeworks / openframeworks/openFrameworks
deprecate ofBackground or refactor to mean ofClear
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
this suggestion comes from a discussion with @ofzach last week.
right now we have a few functions for working with the background in OF:
ofClear(): clears the background color right awayofBackground(): clears the background color right away, and saves the background colorofSetBackgroundColorAuto(): enables or disables whether the saved background color is used to clear the screen at the beginning of each frameofSetBackgroundColor(): changes the saved background color without clearing the screen
having so many functions creates confusion. the only reason that anything besides ofClear() exists is because processing sets an example of putting the background() call in setup() as if it is a property of the document rather than an action.
i suggest we only use ofClear(). alternatively, we can change the name of ofClear() to ofBackground() and note in the changelog that it doesn't work in setup() anymore.
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 four background-related functions named in the issue: ofClear(), ofBackground(), ofSetBackgroundColorAuto(), and ofSetBackgroundColor(). Check their current usage and the discussion referenced in the issue. Done means the API direction is decided and the corresponding deprecation or rename, behavior changes, and changelog updates are agreed and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100