cginternals / cginternals/gloperate
Double initialization of render stage
- Dominant language
- C++
- Stars
- 43
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
This call order is fine:
```
m_canvas->setOpenGLContext();
m_canvas->setRenderStage(...);
```
However, if called the other way around (as a result of my solution to #393), the render stage is initialized twice: once during `setOpenGLContext()` and once during the first call to `render()` (without intermediate deinitialization).
Solution ideas:
- add m_contextInitialized flag to Canvas
- Stage stores a pointer to the context it has been initialized with that can be checked by the Canvas
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing Canvas::setOpenGLContext(), Canvas::setRenderStage(...), and the first render() call in the call order shown. Reproduce the reversed order and inspect when the render stage is initialized, then verify that it is initialized only once without intermediate deinitialization.
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