File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -898,6 +898,9 @@ export class CoreNode extends EventEmitter {
898898 } ;
899899
900900 private onTextureFailed : TextureFailedEventHandler = ( _ , error ) => {
901+ // immediately set isRenderable to false, so that we handle the error
902+ // without waiting for the next frame loop
903+ this . isRenderable = false ;
901904 this . setUpdateType ( UpdateType . IsRenderable ) ;
902905
903906 // If parent has a render texture, flag that we need to update
@@ -912,6 +915,9 @@ export class CoreNode extends EventEmitter {
912915 } ;
913916
914917 private onTextureFreed : TextureFreedEventHandler = ( ) => {
918+ // immediately set isRenderable to false, so that we handle the error
919+ // without waiting for the next frame loop
920+ this . isRenderable = false ;
915921 this . setUpdateType ( UpdateType . IsRenderable ) ;
916922
917923 // If parent has a render texture, flag that we need to update
Original file line number Diff line number Diff line change @@ -255,7 +255,10 @@ export abstract class WebGlCoreShader extends CoreShader {
255255 props : Record < string , unknown > | null ,
256256 ) {
257257 this . bindBufferCollection ( renderOp . buffers ) ;
258- if ( renderOp . textures . length > 0 ) {
258+
259+ // Since we're not using batched rendering yet we can safely test
260+ // for first texture only
261+ if ( renderOp . textures . length > 0 && renderOp . textures [ 0 ] ?. ctxTexture ) {
259262 this . bindTextures ( renderOp . textures ) ;
260263 }
261264
You can’t perform that action at this time.
0 commit comments