View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031170 | Runner | HTML5 | Public | 2019-07-14 18:30 | 2019-08-30 11:37 |
Reporter | YellowAfterlife | Assigned To | Luke Brown | ||
Priority | Low | Severity | C - General | Reproducibility | 100% |
Status | Closed | Resolution | Fixed | ||
Platform | HTML5 | OS | Windows 10 Pro | OS Version | >=18362 |
Product Version | 2.2.3 | ||||
Target Version | 2.2.4 | Fixed in Version | 2.2.4 | ||
Summary | 0031170: HTML5: WebGL preserveDrawingBuffer isn't being set correctly (because of a typo?) | ||||
Description | I 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. | ||||
Tags | Compiler, html5 | ||||
1.4 Found In | |||||
2.x Runtime Found In | 9.9.1.1497 | ||||
2.x Runtime Verified In | 9.9.1.1531 | ||||
|
screen_save_dialog_yy.yyz (986,663 bytes) |
|
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. |
|
|
|
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. |
|
Ah no, I wasn't using obfuscation. That will be why. Thanks |
|
fixed in gitlab |