openframeworks / openframeworks/openFrameworks

retain / release & static map for opengl objects could be abstracted

Open
#1,570 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code-review core development-strategy section-3D
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.