[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Issue with Uniform[1,2,3,4][i,f][v], etc...
- To: Gregg Tavares <email@example.com>
- Subject: Re: [Public WebGL] Issue with Uniform[1,2,3,4][i,f][v], etc...
- From: Kenneth Russell <firstname.lastname@example.org>
- Date: Thu, 6 May 2010 17:35:52 -0700
- Cc: public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1273192555; bh=1QdnX7BzaskWukDcVhIGqFXBd+U=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=hCb5uRhlD3Hqcc0YOHiPuZZMC5HiP8XPQUIr+EClrrMOfc/tvlDP7hnrCshD18IKG phtce9MAf2i0d5dwSxKgA==
- 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=Mcs6XNl+HZmfNOSFK2DzD594ZXSJ8/dzOPnYos/3jG/z1xQuJd1u00vty8ENQYEuE C6KL8S+AylDRE9v1OYFPA==
- In-reply-to: <firstname.lastname@example.org>
- References: <email@example.com>
- Sender: firstname.lastname@example.org
On Tue, May 4, 2010 at 4:26 PM, Gregg Tavares <email@example.com> wrote:
> I just ran over something I didn't know. From the OpenGL ES 2.0 spec
> Section 2.10.4
> If the value of location is -1, the Uniform* commands will silently ignore
> data passed in, and the current uniform values will not be changed.
> That probably means ctx.uniform1f(location, value) and all the related
> functions should silently do nothing if location == null
> That way, like OpenGL, the following WebGL code will work
> var location = ctx.getUniformLocation("someUniformTheDoesNotExist");
> ctx.glUniform1f(location, 1.0); // silently does nothing.
> Currently I think most implementations are failing that example.
> It seems like the WebGL spec should probably mention this.
I didn't know that either. The OpenGL rule makes a lot of sense for
applications that try to look up a bunch of uniforms by name, where
some might not exist in a given shader or might have been optimized
away by the GLSL compiler. We've already seen a few instances of WebGL
content that would have benefitted from allowing a null
WebGLUniformLocation to be passed in without generating an error. I've
updated the text for the uniform* entry points in the WebGL spec to
specify this behavior.
You are currently subscribe to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: