Replace batch.add with ShaderProgram#28
Draft
TinselTowns wants to merge 1 commit into
Draft
Conversation
Due to changes in Pyglet 2.x Graphics Module, instead of using batch.add(), ShaderProgram must be written and used in ShaderProgram.vertex_list(). The ShaderProgram is written in the beginning of led.py, which I use to create a ShaderProgram. Similarly, batch.add() is used in other scripts like simulator.py. So, we could make a txt file with ShaderProgram, because writing it more than once is not efficient, or we could define a global ShaderProgram variable to use it every time we did batch.add().
Member
|
This looks good to me so far! I can run the pi2go and set the LEDs to light up. But if ShaderProgram is used in several places then creating as some kind of python module and importing it would be useful. |
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.
Due to changes in Pyglet 2.x Graphics Module, instead of using batch.add(), ShaderProgram must be written and used in ShaderProgram.vertex_list(). The ShaderProgram is written in the beginning of led.py, which I use to create a ShaderProgram. Similarly, batch.add() is used in other scripts like simulator.py. So, we could make a txt file with ShaderProgram, because writing it more than once is not efficient,
or we could define a global ShaderProgram variable to use it every time we did batch.add().