Skip to content

Commit

Permalink
Merge pull request #14676 from carolhmj/fixTextureOffscreenCanvas
Browse files Browse the repository at this point in the history
Force texture loading with bitmap when in offscreen canvas
  • Loading branch information
sebavan committed Jan 5, 2024
2 parents 3dda3fd + bd4641f commit 2778e58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dev/core/src/Engines/thinEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ export class ThinEngine {

protected _initFeatures(): void {
this._features = {
forceBitmapOverHTMLImageElement: false,
forceBitmapOverHTMLImageElement: typeof HTMLImageElement === "undefined",
supportRenderAndCopyToLodForFloatTextures: this._webGLVersion !== 1,
supportDepthStencilTexture: this._webGLVersion !== 1,
supportShadowSamplers: this._webGLVersion !== 1,
Expand Down Expand Up @@ -4205,7 +4205,7 @@ export class ThinEngine {
texture.onLoadedObservable.remove(onLoadObserver);
}

if (EngineStore.UseFallbackTexture) {
if (EngineStore.UseFallbackTexture && url !== EngineStore.FallbackTexture) {
this._createTextureBase(
EngineStore.FallbackTexture,
noMipmap,
Expand Down

0 comments on commit 2778e58

Please sign in to comment.