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

slightly speed up oscilloscope drawing #713

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

s09bQ5
Copy link
Collaborator

@s09bQ5 s09bQ5 commented Jun 10, 2023

This commit implements the idea I mentioned in #619 (comment) to move all calculations done on the vertices to the matrix. According to gprof the time spent in SingDrawOscilloscope dropped by 90%.

On my computer using glVertex2f would be slightly faster that glVertex2s, but I guess that depends on the GPU and its driver.

The matrix and the vector will be multiplied anyway, so push all
transformations into the matrix.
Copy link
Member

@barbeque-squared barbeque-squared left a comment

Choose a reason for hiding this comment

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

Works great! Approved and merging!

@barbeque-squared barbeque-squared merged commit 4b13507 into UltraStar-Deluxe:master Jun 17, 2023
@s09bQ5 s09bQ5 deleted the scope branch June 18, 2023 19:42
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.

2 participants