Procházet zdrojové kódy

avoid releasing texture in use

Trevor Baron před 6 roky
rodič
revize
db1a60a061

+ 0 - 1
src/Materials/Textures/texture.ts

@@ -702,7 +702,6 @@ export class Texture extends BaseTexture {
     public static CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE,
         onLoad: Nullable<() => void> = null, onError: Nullable<() => void> = null, format: number = Constants.TEXTUREFORMAT_RGBA): Texture {
         var texture = new Texture("data:" + name, scene, noMipmap, invertY, samplingMode, onLoad, onError, data, false, format);
-        scene.getEngine()._internalTexturesCache.push(texture.getInternalTexture()!);
         return texture;
     }
 

+ 0 - 1
src/Misc/brdfTextureTools.ts

@@ -62,7 +62,6 @@ export class BRDFTextureTools {
 
                 // Cleanup
                 engine.restoreDefaultFramebuffer();
-                engine._releaseTexture(texture);
                 engine._releaseFramebufferObjects(expandedTexture);
                 if (rgbdPostProcess) {
                     rgbdPostProcess.dispose();