MCPcopy Create free account
hub / github.com/csaez/mscreen / update

Method update

mscreen.py:208–220  ·  view source on GitHub ↗

`update` is in charge of updating the data used in OpenGL calls during drawing, there might be many use cases depending on the primitive, but a common one would be updating the drawable points according to primitive's `transform` (i.e. `CurvePrim`). Notice h

(self)

Source from the content-addressed store, hash-verified

206 # === To be extended by subclasses ===
207
208 def update(self):
209 """
210 `update` is in charge of updating the data used in OpenGL calls during
211 drawing, there might be many use cases depending on the primitive, but
212 a common one would be updating the drawable points according to
213 primitive's `transform` (i.e. `CurvePrim`).
214
215 Notice how this method sets `isDirty` flag to False at the end, this
216 is VERY IMPORTANT, otherwise your primitive will be updated each time
217 the viewport gets refreshed (even when the data doesn't change).
218 """
219 logger.debug('Updating: {}'.format(self))
220 self.isDirty = False
221
222 def draw(self, view, renderer):
223 """

Callers 5

drawMethod · 0.95
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected