Added tabs for displaying shader code in examples #99
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.
When viewing certain examples, such as shaders, seeing the
.csource code is all well and good, but the meat of it is in the shader files themselves.This PR automatically scans the
.ccode for references to example shader files, loads them and displays a tab view for flipping between the C source and the shaders source(s). The shader source(s) are also formatted withhighlight.js, usingglslformatting.The CSS and JS are minimal, no additional dependencies added.
Currently it only loads the GLSL 330 versions; this could be modified in the future to allow the user to choose the version.