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

Re: [Public WebGL] Spec change request.



Yeah - good call!  Uniform setting stuff typically happens in the very
innermost loop of the renderer and every tiny bit helps.  It's also
tough to optimize away when you have different shaders in different
rendering passes.

  -- Steve

On 12/05/2010 01:53 PM, Kenneth Russell wrote:
> Yes, this behavior was changed in the spec in the not-too-distant past
> precisely for this reason. OpenGL and OpenGL ES ignore calls to
> glUniform* with -1 as the uniform location, and we realized that WebGL
> needs to do the same to keep calling code simple.
>
> -Ken
>
> On Sun, Dec 5, 2010 at 8:55 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
>   
>> Oh right, I had forgotten about that. I confirm that's the implemented behavior, see the OBTAIN_UNIFORM_LOCATION macro in WebGLContextGL.cpp.
>>
>> Benoit
>>
>> ----- Original Message -----
>>     
>>> Argh! OK - forget it.
>>>
>>> I just re-read the spec document - and it seems that what I'm asking
>>> for
>>> is already there!
>>>
>>> 5.13.10 says: "If the passed |location| is null, the data passed in
>>> will
>>> be silently ignored and no uniform variables will be changed."
>>>
>>> I guess this either changed at some point in the past - or one or
>>> other
>>> implementation may have had a bug that got fixed. Months back when I
>>> started working on this stuff, I needed this test to avoid getting
>>> errors - and now that I've taken it out, everything does seem to work
>>> just fine...at least in Minefield under Linux - I'll test some more
>>> platforms later to be sure.
>>>
>>> Sorry!
>>>
>>> -- Steve
>>>
>>> -----------------------------------------------------------
>>> 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:
>>>       
>> -----------------------------------------------------------
>> 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:
>>
>>
>>     

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