BF: Fix view and projection matrices not being applied before first flip#7381
Merged
TEParsons merged 1 commit intopsychopy:releasefrom Oct 3, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release #7381 +/- ##
===========================================
- Coverage 12.26% 12.24% -0.03%
===========================================
Files 351 351
Lines 64531 64537 +6
===========================================
- Hits 7917 7904 -13
- Misses 56614 56633 +19
🚀 New features to boost your workflow:
|
TEParsons
approved these changes
Oct 3, 2025
Contributor
TEParsons
left a comment
There was a problem hiding this comment.
I'm not sure how to test the bug this fixes but the changes seem sound and don't appear to affect running normally so I'm happy to pull in :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the issue where visual stimuli appear incorrectly scaled prior to the first flip call. This was caused by the projection matrix for 2D rendering being incorrect until cleared and reset by a flip call. How the default ortho projection matrix is computed has been changed, no longer accounting for window dimensions since that's dealt with by the stimuli's vertex data container
I added method
setDefaultView()to put matrices in the correct state for PsychoPy's 2D stim classes and now havesetOrthographicViewseparate for those who wish to scale coordinates that way