Currently this mistake is complicated to debug, because:
- Loading callback if fired without problems
- Rendering without resources is fine
- g2.drawImage fails with:
Error: Cannot cast {
g2canvas : null,
myWidth : 240,
myHeight : 160,
myFormat : 0,
renderTarget : false,
image : [object HTMLImageElement],
video : null
} to {
__name__ : true,
init : <function>,
formatByteSize : <function>
}
And endless Error: End before you begin spam.
We can throw this problem at step 1 if do not ignore null in SystemImpl.gl here 10 years ago:
|
public function createTexture() { |
|
if (SystemImpl.gl == null) |
|
return; |
Or maybe even earlier someway.
Currently this mistake is complicated to debug, because:
And endless
Error: End before you beginspam.We can throw this problem at step 1 if do not ignore
nullinSystemImpl.glhere 10 years ago:Kha/Backends/HTML5/kha/CanvasImage.hx
Lines 144 to 146 in 2462f98
Or maybe even earlier someway.