HTML5 splash image bug in Safari (DEF-3061) (SOLVED)

Setting background color always to black was chosen because it makes behavior between different platforms to be the same.
Let’s go through the all steps regarding that issue.
Before initial fix with alphabits graphics context background was always black (I say about GL context, not html element). When you set any clear color - it define which color should be used for frame buffer filling. In some cases (need setup blending function in specific manner) you can obtains fully transparent pixels in you frame buffer (because of blending function initial color also blended and result part of frame buffer becomes transparent). When frame buffer displayed transparent part becomes black because of context background.
For the desktop platform alhabits configuration options was always here. But nobody noticed transparent part of graphics context because it was black background of application window.
Than alphabits changes arrived for web. And users started observe Defold logo under the transparent graphics context. I believe it happened because initially no black background was defined for underlying html element.
So the final part of changes was clean background and set background color to black to meet the same behavior as it’s presented at desktop platforms.

I agree only with your concerns about rendering performance. And thank for pointing to the wrong constant value.

But regarding all other points that you raised:

  1. My opinion is that background of html element should be cleared and should be set to black (or it can be configurable via game.project settings)
  2. Clear color settings relates only to graphics stuff and shouldn’t correlate with anything outside of rendering commands.
2 Likes