Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch performs various rendering optimizations, giving a minor performance improvement when using a Waveform source. As the gradient shader never changes, it does not need to be reloaded and recompiled every render frame, so this patch adds an instance member to cache the compiled shader object. The shader is loaded and compiled upon instance creation. The vertex buffers used for curve and bars rendering are cached in a similar way to avoid recreating and freeing them on every render frame. Additionally, the curve vertex buffer is pre-populated upon creation to avoid needing to update all three components of the vec3 when actually rendering, instead only updating the y component.
- Loading branch information
Showing
3 changed files
with
113 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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