View Issue Details

IDProjectCategoryView StatusLast Update
0031170RunnerHTML5Public2019-08-30 11:37
ReporterYellowAfterlifeAssigned ToLuke Brown 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformHTML5OSWindows 10 ProOS Version>=18362
Product Version2.2.3 
Target Version2.2.4Fixed in Version2.2.4 
Summary0031170: HTML5: WebGL preserveDrawingBuffer isn't being set correctly (because of a typo?)
DescriptionI was investigating what was the actual deal with my old HTML5 screenshot saver extension not working with WebGL enabled, and it comes down to AssetCompiler - the variable name that it's using for the properties object is "WebGLPreserveDrawingBuffer", but the runtime is checking for "PreserveDrawingBuffer".

Without preserveDrawingBuffer attribute in canvas.getContext, the entire group of built-ins (screen_save, surface_get_pixel on application_surface, etc.) do not work correctly, and neither do extensions that rely on sampling pixel data from canvas.
TagsCompiler, html5
1.4 Found In
2.x Runtime Found In9.9.1.1497
2.x Runtime Verified In9.9.1.1531

Activities

YellowAfterlife

2019-07-14 18:30

Developer  

screen_save_dialog_yy.yyz (986,663 bytes)

Luke Brown

2019-07-16 14:33

Developer   ~0064436

The provided yyz seems to work correctly on HTML5 for me. Perhaps I'm not fully understanding what the issue is.
Regarding "WebGLPreserveDrawingBuffer" and "PreserveDrawingBuffer", it looks as though even "WebGLPreserveDrawingBuffer" is used in the options, this value is then used to set the "PreserveDrawingBuffer" property of the options object in the InitWebGL function, which is what is then used when binding the webgl context in BindWebGL. Running the test in chrome, firefox, and edge seems to function correctly and I'm able to save a screenshot in all 3 browsers.

YellowAfterlife

2019-07-16 16:05

Developer  

png1.png (51,282 bytes)
png1.png (51,282 bytes)
png2.png (38,890 bytes)
png2.png (38,890 bytes)

YellowAfterlife

2019-07-16 16:05

Developer   ~0064437

Were you testing with obfuscation enabled? On 9.9.1501 the sample technically doesn't run at all after minification pass due to missing semicolons in GetWithArray and audio_emitter_pitch. Having fixed that by hand, it still ceases to function.

Attached:
png1: The options object does use WebGLPreserveDrawingBuffer, but this is not the property name that is being read from it.
png2: Object from png1 being passed in getContext, thus not setting preserveDrawingBuffer.

Luke Brown

2019-07-16 16:29

Developer   ~0064441

Ah no, I wasn't using obfuscation. That will be why. Thanks

Luke Brown

2019-07-23 11:52

Developer   ~0064480

fixed in gitlab