[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Few questions/comments about context creation attributes

On Wed, May 26, 2010 at 11:27 PM, Cedric Vivier <cedricv@neonux.com> wrote:
> On Thu, May 27, 2010 at 12:51, Vladimir Vukicevic <vladimir@mozilla.com> wrote:
>> FWIW, I'd be happy to disable the stencil buffer by default -- RGBA + depth
>> seems like a very reasonable default context format.
> I think we can discuss on the RGBA versus RGB as well.
> Two arguments for this :
> - on mobile devices the common default and most efficient color buffer
> mode is RGB (565 but the actual bits-per-component is irrelevant here)
> - of all WebGL demos available very few do need alpha-compositing with
> the HTML page, almost all of them do set clearColor with alpha=1.0,
> without passing alpha:false as context attribute, based on this real
> usage statistic making WebGL an opaque surface by default makes sense
> imho as it helps performance (and memory usage) for the greatest
> number of use cases.
> In fact when testing RGB context (hardcoded in FF to check all apps) I
> realized I forgot to use clearColor in a work-in-progress app when
> opaque white was intended (this gone unnoticed since the HTML page
> currently has white background but the content was intended to be
> white, whatever the HTML background is), so this might also prove
> beneficial to avoid unnecessary/unintended/wasteful alpha-blending due
> to a simple mistake/typo that would not happen if presence of alpha
> channel was set explicitly when actually needed.

I think the alpha channel should be enabled by default. There are many
situations in HTML compositing where alpha=0 implies that elements
underneath the current one show through. Since WebGL is a spec for the
web I think the default should be the least surprising result.

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: