def _update(self): log.debug("GPU: Updating texture") if self.pending_data: x,width = self.pending_data itemsize = self.strides[0] x /= itemsize width /= itemsize gl.glTexSubImage1D(self.target, 0, x, width, self.format, self.gtype, self) self._pending_data = None self._need_update = False
def _update(self): log.debug("GPU: Updating texture") if self.pending_data: start, stop = self.pending_data offset, nbytes = start, stop-start itemsize = self.strides[0] x = offset // itemsize width = nbytes//itemsize gl.glTexSubImage1D(self.target, 0, x, width, self._cpu_format, self.gtype, self) # x,width = self.pending_data # itemsize = self.strides[0] # x /= itemsize # width /= itemsize # gl.glTexSubImage1D(self.target, 0, x, width, self._cpu_format, self.gtype, self) self._pending_data = None self._need_update = False
def _update(self): log.debug("GPU: Updating texture") if self.pending_data: start, stop = self.pending_data offset, nbytes = start, stop-start itemsize = self.strides[0] x = offset / itemsize width = nbytes/itemsize gl.glTexSubImage1D(self.target, 0, x, width, self._cpu_format, self.gtype, self) # x,width = self.pending_data # itemsize = self.strides[0] # x /= itemsize # width /= itemsize # gl.glTexSubImage1D(self.target, 0, x, width, self._cpu_format, self.gtype, self) self._pending_data = None self._need_update = False