openframeworks / openframeworks/openFrameworks
ofGLProgrammableRenderer: beginDefaultShader attempts to run before loaded
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
On the RPi I was seeing a few messages at the launch of the program from ofShader.
[ error ] ofShader: begin(): couldn't begin, shader not loaded
I think this may not be unique to the RPi though. I've narrowed it down to this - I just don't feel I am knowledgeable enough about the render pipeline to fix without breaking something
Here is a simplified call stack
ofSetupOpenGL
ofAppEGLWindow::setupOpenGL
ofAppEGLWindow::setupPeripherals
//ofAppEGLWindow uses an ofImage for the mouse cursor
ofImage_<unsigned char>::allocate
ofTexture::allocate
ofTexture::enableTextureTarget
ofGLProgrammableRenderer::enableTextureTarget
//ofGLProgrammableRenderer::setup hasn't been called yet,
//therefore no shaders have been loaded
ofGLProgrammableRenderer::beginDefaultShader
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 at ofAppEGLWindow::setupPeripherals and trace the ofImage allocation through ofTexture::allocate and ofGLProgrammableRenderer::enableTextureTarget. Compare this path with when ofGLProgrammableRenderer::setup and beginDefaultShader run. Done means startup no longer attempts to begin an unloaded shader on the RPi path without breaking renderer initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100