Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove texture guessing for vispy, try texture_format='auto' before falling back #98

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

tlambert03
Copy link
Member

This removes the "look before you leap" logic for creating an openGL context and checking whether float textures are supported before using texture_format='auto' on vispy. Instead, it just tries to use 'auto' and falls back to CPU-backed textures if it fails.

The reason is that some tests have been failing periodically for wxPython (emitting a warning from the CPUScaled texture). Looking into those test errors made me realize that wx was never using GPU scaled textures on vispy, and that was presumably due to an error in the output supports_float_textures in a wx context. Rather than try to fix that, it think it's better to just try to use a gpu-texture, and let vispy error and fallback to CPU

@tlambert03 tlambert03 changed the title fix: remove texture guessing for vispy fix: remove texture guessing for vispy, try texture_format='auto' before falling back Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.49%. Comparing base (c1be08a) to head (76b26e6).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   71.71%   71.49%   -0.23%     
==========================================
  Files          43       42       -1     
  Lines        4430     4406      -24     
==========================================
- Hits         3177     3150      -27     
- Misses       1253     1256       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlambert03 tlambert03 merged commit d02445c into pyapp-kit:main Jan 17, 2025
51 of 52 checks passed
@tlambert03 tlambert03 deleted the remove-texture-guessing branch January 17, 2025 14:37
@tlambert03 tlambert03 added the bug Something isn't working label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant