MCPcopy Create free account
hub / github.com/esengine/esengine / uploadTexture

Method uploadTexture

packages/fairygui/src/text/DynamicFont.ts:353–363  ·  view source on GitHub ↗

* Upload texture to GPU * 上传纹理到 GPU

()

Source from the content-addressed store, hash-verified

351 * 上传纹理到 GPU
352 */
353 private uploadTexture(): void {
354 if (!this._dirty || !this._onTextureUpload || !this._dirtyRegion) return;
355
356 const r = this._dirtyRegion;
357 const imageData = this._ctx.getImageData(r.x, r.y, r.width, r.height);
358 this._onTextureUpload(imageData, r.x, r.y, r.width, r.height);
359
360 this._dirty = false;
361 this._dirtyRegion = null;
362 this.version++;
363 }
364
365 /**
366 * Get full canvas image data (for initial upload)

Callers 1

requestCharactersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected