[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] texImage2D calls with HTMLVideoElement
- To: Adrienne Walker <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] texImage2D calls with HTMLVideoElement
- From: Kenneth Russell <email@example.com>
- Date: Fri, 13 Aug 2010 12:27:48 -0700
- Cc: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281727672; bh=9tlNWWaZwuTT+TB7CGEkV7kAg3g=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=M+hYstvQRI1P6AquNBu/TZBzYs7sJT+NQgJateQxYH6jE3JS8sQijrEYvVii2DIP8 u8kAPLN2XbmiBpBHISC0g==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=sY/5LOSYiBniuH3O3NqnyNOODrejDeaI0VPh8Z0V+5H77se7dpMG6y3d1MfoFR+nC Ptf+86sCHEhfMQgtwdP5A==
- In-reply-to: <AANLkTimdEw+Z7r2RU98ojVmieH3scnu_wi+akoGTiuUc@mail.gmail.com>
- References: <AANLkTimdEw+Z7r2RU98ojVmieH3scnu_wi+akoGTiuUc@mail.gmail.com>
- Sender: email@example.com
On Fri, Aug 13, 2010 at 11:03 AM, Adrienne Walker <firstname.lastname@example.org> wrote:
> I was looking at the WebGL spec about the tex(Sub)Image2D calls and
> had two questions:
> 1) Why do the texImage2D calls that take HTMLMediaElement parameters
> allow the specification of format and type? Along those same lines,
> why is the spec so insistent that image data must be downconverted to
> lower precision if it is specified?
Format (and internalformat) and type are specifiable so that authors
can choose to use less VRAM for a given texture. The spec requires
that the incoming image be converted to the given precision for
repeatability across platforms; it would be bad if on one platform,
uploading to an UNSIGNED_SHORT_5_5_5_1 texture preserved 8 bits of
data per channel, but on another, it dropped bits. An author might
develop on the first platform, expect a certain rendering fidelity,
and then later run on the second platform and find that their game
unexpectedly looked bad.
> The only use case I can imagine is that with a packed format you save
> on upload bandwidth and texture memory at the expense of conversion,
> but only if the HTMLMediaElement is being composited on the CPU, which
> is likely to not be the case for most of those element types in the
> future. The element's width and height are already implicitly used as
> parameters in the call--why not the format as well?
If a packed format is requested, the conversion can be done on the
GPU, although doing so is a little more involved; the source image or
video element would be bound to a framebuffer object and
glCopyTexSubImage2D used to populate the destination texture with
Once it was decided (during a recent F2F of the WebGL working group)
to allow the type of the texture to be specified, it was required for
future compatibility to add both the format and internalformat
> 2) Regarding the texImage2D call with the HTMLVideoElement, the spec
> is unclear about how to handle poster attributes. Is this
> intentionally left as an implementation detail?
I'm sure this is an oversight on our part. If you have any suggestions
on additional spec text please let us know.
> Forgive me if either of these have been discussed before. I tried
> searching the email archives, but couldn't turn anything up.
> You are currently subscribed to email@example.com.
> To unsubscribe, send an email to firstname.lastname@example.org with
> the following command in the body of your email:
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: