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

Re: [Public WebGL] Proposal: Generate INVALID_VALUE if value >= MAX_TEXTURE_IMAGE_UNITS on uniform1f(v) for samplers

On Tue, May 1, 2012 at 3:13 PM, Gregg Tavares (勤) <gman@google.com> wrote:
> A developer ran into a bug today where their app was working on Linux but
> not Mac and Windows.
> The issue was they were calling
>    gl.uniform1f(someSamplerLocation, gl.TEXTURE0);
> when they should have been calling
>    gl.uniform1f(someSamplerLocation, 0);
> You could say this is their fault for writing bad code but the thing is
> there are no errors for this condition defined by OpenGL ES or WebGL AFAIK.
> It just happens that on Linux calling gl.uniform1f(someSamplerLocation,
> 33984) uses texture unit 0 and on Mac and Windows it does something else.
> Given that uniforms are program specific and given that at runtime we know
> whether or not a particular location is a sampler, should we generate an
> if the value set for a sampler uniform is greater than or

This sounds good to me.


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:
unsubscribe public_webgl