eldog
Hi all,
I’d like to have a transparent background using Emscripten/WebGL as I’d like to display a video behind the scene (attempting some AR).
I’ve tried setting the clear color alpha value using some code I found on the forums, but to no avail.
I’m doing something like
// Does *NOT* create a transparent canvas in Emscripten/WebGL
RenderPath * rp = viewport->GetRenderPath();
for ( int i = 0; i < rp->GetNumCommands(); i++ )
{
RenderPathCommand * cmd = rp->GetCommand( i );
if ( cmd->type_ == RenderCommandType::CMD_CLEAR )
{
cmd->useFogColor_ = false;
cmd->clearColor_ = Color(1.0f, 1.0f, 1.0f, 0.5f );
}
}
Thanks