Skip to content

Fix rendering stall after transition shader on Emscripten / Chrome (v4.1.x)#969

Open
mbaetgen-wup wants to merge 1 commit intoprojectM-visualizer:v4.1.xfrom
mbaetgen-wup:fix/emscripten-transition-bug-4-1-backport
Open

Fix rendering stall after transition shader on Emscripten / Chrome (v4.1.x)#969
mbaetgen-wup wants to merge 1 commit intoprojectM-visualizer:v4.1.xfrom
mbaetgen-wup:fix/emscripten-transition-bug-4-1-backport

Conversation

@mbaetgen-wup
Copy link
Collaborator

No description provided.

@mbaetgen-wup mbaetgen-wup changed the title fix for rendering stall after transition shader on Emscripten / Chrome fix for rendering stall after transition shader on Emscripten / Chrome (v4.1.x) Feb 26, 2026
@mbaetgen-wup mbaetgen-wup changed the title fix for rendering stall after transition shader on Emscripten / Chrome (v4.1.x) Fix rendering stall after transition shader on Emscripten / Chrome (v4.1.x) Feb 26, 2026
@mbaetgen-wup mbaetgen-wup force-pushed the fix/emscripten-transition-bug-4-1-backport branch 2 times, most recently from b38d60d to b016fa0 Compare February 26, 2026 05:40
@mbaetgen-wup mbaetgen-wup marked this pull request as ready for review February 26, 2026 08:32
// On WebGL2 / Chrome ANGLE, the default framebuffer's draw buffer must
// be explicitly set to GL_BACK after preset rendering, which may leave
// per-FBO draw buffer state that leaks into FBO 0 on some drivers.
GLenum backBuf = GL_BACK;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs for glDrawBuffers() for OpenGL Core state:

The symbolic constants GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, and GL_FRONT_AND_BACK are not allowed in the bufs array since they may refer to multiple buffers.

So this might break rendering on Desktop versions, or at least cause a GL error to be issued.
I'd highly recommend wrapping this in a #ifdef USE_GLES block.

Copy link
Member

@kblaschke kblaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow the wrong option was selected, I wanted to request changes. See above.

@mbaetgen-wup mbaetgen-wup force-pushed the fix/emscripten-transition-bug-4-1-backport branch from b016fa0 to efeb3ba Compare February 26, 2026 10:18
@kblaschke kblaschke added this to the 4.1.7 milestone Feb 26, 2026
@kblaschke kblaschke moved this from In Progress to In Review in libprojectM Release 4.1 Feb 26, 2026
@kblaschke kblaschke added the bug The issue is (potentially) a bug. label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug The issue is (potentially) a bug.

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants