Improve slider rendering.#205
Merged
itdelatrisu merged 2 commits intoitdelatrisu:masterfrom Dec 6, 2016
mad-s:master
Merged
Conversation
Significantly improves looks and performance of sliders, especially on shared memory graphics models like integegrated GPUs. No longer renders using cones and a framebuffer, instead renders quads and triangles for curves, using much less geometry.
Owner
|
Awesome, this looks way better. I'll wait a few days before merging in case anyone else wants to comment. Thanks a lot! |
|
With this change, the slider curve does not render for me anymore. It just looks like this: I'm on Arch (Linux 4.8.11) with a GTX 760Ti. My OpenGL version string is On a side note, does this glFlush call serve any purpose? It looks redundant to me. EDIT: After some investigation, I found the cause of the issue to be here. We can't use the |
Contributor
Author
|
Sorry, I'm not used to writing GLSL 1.1. Should be fixed now. |
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.

The old code created a framebuffer for every slider drawn, which results in a major performance loss, especially on shared memory systems like integrated GPUs.
The new codes renders a 'ramp', not individual cones, so the sliders look extra smooth.
Also, there is no framebuffer involved, meaning the new sliders can be used on more systems.