Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Screenshot save dialog

GameMaker & Construct 2 plugins to let user pick where to save screenshot(s). · By YellowAfterlife

Turning WebGL off fixed it, but...

A topic by doubtfulgames created Jul 12, 2019 Views: 361 Replies: 2
Viewing posts 1 to 2

I was having the transparent image problem (HTML5), so I turned off WebGL, which made it work perfectly - but my shaders require WebGL to be on. Any idea if there's a way around turning off WebGL?

Developer

Well, I guess you can insert the following into your index.html template before the game's < script > element

<script>
(function() {
var base = HTMLCanvasElement.prototype.getContext;
HTMLCanvasElement.prototype.getContext = function(mode, attrs) {
if (attrs && typeof attrs == "object") attrs.preserveDrawingBuffer = true;
return base.apply(this, [].slice.call(arguments));
};
})();
</script>

It's a pretty strange hack but whatever.

Went on and checked what's the deal anyway, subsequently filing a bug:

https://bugs.yoyogames.com/view.php?id=31170

You're awesome! Thank you.