openfl-samples icon indicating copy to clipboard operation
openfl-samples copied to clipboard

OpenGLView is not initialised on HerokuShaders for html5

Open mikedotalmond opened this issue 10 years ago • 0 comments

With the supplied project.xml build file, the HerokuShaders example does not work on html5 - the call to OpenGLView.isSupported returns false.

I first assumed that I'd need the -D webgl flag, but that didn't work either - OpenGLView.isSupported will return true but the webgl context is not initialised (at runtime lime_graphics_opengl_GL.context is null). So I had to investigate the code in OpenGLView.

It seems to need the -D dom flag setting to work properly on html5. But it's not clear if -D webgl is also needed or of any benefit.

Adding <haxeflag name"-D dom" if="html5" /> to project.xml fixes the issue.

mikedotalmond avatar Oct 28 '15 16:10 mikedotalmond