Skip to content

Commit b334c80

Browse files
committed
- added additional valid object types when checking if bound texture image is valid
1 parent 2c89992 commit b334c80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/yyWebGL.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5055,7 +5055,11 @@ function WebGL_IsTextureImageValid(_tex)
50555055
}
50565056

50575057
if(_tex.Image instanceof HTMLImageElement
5058-
|| _tex.Image instanceof Uint8Array)
5058+
|| _tex.Image instanceof HTMLCanvasElement
5059+
|| _tex.Image instanceof HTMLVideoElement
5060+
|| _tex.Image instanceof ImageData
5061+
|| _tex.Image instanceof Uint8Array
5062+
)
50595063
{
50605064
return true;
50615065
}

0 commit comments

Comments
 (0)