Skip to content

eglSwapBuffers vispy warning#796

Merged
ArisMorgens merged 1 commit intomasterfrom
Aris/vispy_warning
Mar 24, 2026
Merged

eglSwapBuffers vispy warning#796
ArisMorgens merged 1 commit intomasterfrom
Aris/vispy_warning

Conversation

@ArisMorgens
Copy link
Copy Markdown
Member

When opening the Lighthouse tab, we repeatedly get this warning:

WARNING: eglSwapBuffers failed with 0x300d, surface: 0x0
WARNING:vispy:eglSwapBuffers failed with 0x300d, surface: 0x0

This is caused by Qt and vispy trying to do the same job.

Specifically, vispy draws the 3D scene into an offscreen buffer (FBO), not directly onto the screen.

Qt has a built-in mechanism where after vispy finishes drawing into the FBO, Qt takes that image and puts it on screen by itself.

Then, vispy, by default, also tries to put the scene on screen itself after every draw. That's caused by the autoswap=True default. But since Qt is already doing it, vispy's attempt is redundant and that's where we get the 0x300d error.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses repeated eglSwapBuffers failed with 0x300d warnings when opening the Lighthouse tab by preventing vispy from performing an extra buffer swap that Qt already handles when embedding the canvas.

Changes:

  • Disable vispy’s automatic buffer swapping for the Lighthouse 3D scene canvas by setting autoswap=False on SceneCanvas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cfclient/ui/tabs/lighthouse_tab.py
@ArisMorgens ArisMorgens merged commit 9e0f8d3 into master Mar 24, 2026
1 check passed
@ArisMorgens ArisMorgens deleted the Aris/vispy_warning branch March 24, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants