MCPcopy
hub / github.com/XingangPan/DragGAN / bind

Method bind

gui_utils/gl_utils.py:174–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

172
173 @contextlib.contextmanager
174 def bind(self):
175 prev_id = gl.glGetInteger(gl.GL_TEXTURE_BINDING_2D)
176 gl.glBindTexture(gl.GL_TEXTURE_2D, self.gl_id)
177 yield
178 gl.glBindTexture(gl.GL_TEXTURE_2D, prev_id)
179
180 def update(self, image):
181 if image is not None:

Callers 3

__init__Method · 0.95
updateMethod · 0.95
drawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected