Created
November 23, 2018 16:25
-
-
Save flowernert/caf89416b6fa8886a09f07064058b753 to your computer and use it in GitHub Desktop.
(commented code is the interesting stuff)
faster multiples calls to openGL draw
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
def on_draw(self, event): | |
#can be optimized if drawing 1 polyhedron per loop rather than 1 polyhedron's polygon per loop | |
gloo.clear() | |
self.program.draw(mode="lines", indices=self.indices) | |
# self.context.glir.associate(self.program.glir) | |
# for i in self.indices: | |
# self.context.glir.associate(i.glir) | |
# selection = i.id, "UNSIGNED_SHORT", i.size | |
# self.context.glir.command('DRAW', self.program._id, "line_strip", selection) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment