openframeworks / openframeworks/openFrameworks
retain / release & static map for opengl objects could be abstracted
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
in reviewing the code, we've seen a bunch of chunks of code for each opengl based object that handles a static map between GLunits and int ids, and which has retain and release code that the objects (ofLight, ofTexture, ofFbo) use. It seems like this code could be written once (glManager?), and then used in multiple places, with some minor customization based on the object you're tracking. It would mean less repetition in the code, and if we want to expand on what this code does it will make it easier to have it only in one place.
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
Review the retain/release logic and static GLunit-to-int maps used by ofLight, ofTexture, and ofFbo, then compare their shared behavior and customization needs. Done means the repeated lifecycle and mapping logic is centralized through the proposed glManager abstraction without changing the objects’ behavior.
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
- 25/100