-
-
Notifications
You must be signed in to change notification settings - Fork 418
Refactor Geometry Rendering #909
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
Merged
kblaschke
merged 21 commits into
projectM-visualizer:master
from
kblaschke:refactor-geometry-rendering
Oct 27, 2025
Merged
Refactor Geometry Rendering #909
kblaschke
merged 21 commits into
projectM-visualizer:master
from
kblaschke:refactor-geometry-rendering
Oct 27, 2025
Conversation
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
bfad7d1 to
92c94c8
Compare
|
Cherry-picked a commit from @kholbrook1303 from PR #907 on top of my changes. Fixes issue #903 |
2 tasks
28435d5 to
a242999
Compare
blaquewithaq
approved these changes
Oct 25, 2025
mbaetgen-wup
approved these changes
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been running through a couple presets with these changes. Rendering appears correct.
Also removing failed presets immediately, which will prevent the same preset from being tried again. Increased default retry count to 500.
This will prevent the playback history from vanishing unexpectedly in case a preset can't be loaded. Also fixed a few typos in the Doxygen comments and clarified how the history is changed when changing the playlist.
Reduced draw calls from 4/8 to 1/2 by specifying 8 vertices accessed via indices to draw each border in a single call.
Also get rid of the additional index attribute array, as gl_VertexID contains the same information and is free.
Now using the generated grid vertices and indices directly, drawing the warp mesh in a single draw call. This will increase the number of drawn vertices, but all GPUs made in the past decade can easily deal with 100K triangles or more.
…e rendering to match MilkDrop orientation
a242999 to
890b78a
Compare
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.
In preparation for future changes and to make the rendering process less verbose, I've refactored all code related to drawing geometry (points, lines, triangles, quads, ...) into a small number of wrapper classes which store and manage the vertex data. Since I've reworked all rendering code in projectM in this changeset, here's an overview of what has changed:
TextureCopierare now cached.Meshclass manages the most frequently used buffers: position, color and texture coordinates.Meshclass always uses indexed rendering, e.g. usingglDrawElements().gl_VertexIDuniform.Pointdata type in the default waveform implementations has been changed from theRenderItemtype to the newPointclass in thelibprojectM::Renderernamespace.Besides reviewing the code, helping with regression testing with presets would be really nice! I've already tested each effect thoroughly while implementing the changes, but some small mistakes may still be present.