Null engine calls this._gl.flush() on iOS

Hi,
Null engine calls this._gl.flush() on iOS. The path for this is:

engine.EndFrame(), which calls
ThinEngine.EndFrame(), which checks this_badOS and then calls
this.flushFrameBuffer() in ThinEngine
which calls this._gl.flush()

For me, this causes a crash as I run a null engine in a background thread and calling gl.flush() raises an exception in iOS.

I can get around this issue by manually setting engine._badOS to false, but was thinking that maybe null engine should override flushFrameBuffer() to do nothing?

thanks

I agree, here’s the fix:

2 Likes

Could you explain please the technical background of this? Why don’t we need to flush the frame buffer in this case?

The null engine essentially does nothing, at least on a graphical level. flush is a WebGL-specific API that has no meaning in this context.

Thanks!

Until now I missunderstood the difference between the null engine and head-less rendering. After reading the docs I get the concept.