openframeworks / openframeworks/openFrameworks
Impossible to attach multiple colour buffers to ofFbo
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
If ofFbo::Settings.numColorbuffers is set to greater than 1 then it is set back to 1 by this line in ofFbo::createAndAttachTexture:
settings.numColorbuffers = settings.colorFormats.size();
If you add multiple formats to ofFbo::Settings.colorFormats, then it is resized to 1 by this line in ofFbo::createAndAttachTexture:
settings.colorFormats.resize(attachmentPoint + 1);
In 0.7.4 you could just set numColorbuffers. Is the intention here that you can set either?
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 ofFbo::createAndAttachTexture and inspect how ofFbo::Settings.numColorbuffers and colorFormats are updated around the two cited lines. Reproduce the behavior with multiple color formats and with numColorbuffers greater than one, then verify that the intended configuration is preserved and covered by the relevant FBO tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100