[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Explicit unboxing for object identifiers
- To: "Gregg Tavares (wrk)" <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] Explicit unboxing for object identifiers
- From: Kenneth Russell <email@example.com>
- Date: Thu, 26 Apr 2012 19:03:33 -0700
- Cc: Vladimir Vukicevic <firstname.lastname@example.org>, Benoit Jacob <email@example.com>, Rehno Lindeque <firstname.lastname@example.org>, public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=PN20NfnYD6MAAjDWWG2KunuDRKyTfX4NmMvBfyNrlF0=; b=fGbmKJHBefvS4xA+YsvlUsqgMHDMwahl20bm+1w74VCwHETSSEjYE3qI7INPrQy4dE a3Dbz9YL9nPrAbtK+NhB7pa4zTPnGLbqh1quUjxvpFLKLoLITlOFrCm8V/teWQ3cu4y9 o37TvNbICr+n+isCZ8XQ+iqeU0QgnqAPe6cVQSlc5EesYIJ4XBUrjBaJ5JdJlfeG1lr7 XUa9RDXFpViV9CipqOX2V/WvIQPADI8qB9HpYgcH6BRnLtllHOm1d6A1HA/xsKwukEKW SEc1jXnF4haPWCFo2o5+pl5LRO5H3rjOvYp7yeQH7PakiCzCyHhEJVbarF+/GqeL3m26 HNAQ==
- In-reply-to: <CAKZ+BNqEo1zuN0xOGOdTVa2QcyJi0nchUtadW4SN-DkWmPpFXg@mail.gmail.com>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <CAMDuWHcATfODh8Sfcp_Lzxz7M9NXCO6mCyisfpLYWvKruVyQdA@mail.gmail.com> <firstname.lastname@example.org> <CA+cAUn6fS1F7M1nkmRrTcHucD+_gaVXu=fWXbETntgoBL_OTpw@mail.gmail.com> <CAKZ+BNqEo1zuN0xOGOdTVa2QcyJi0nchUtadW4SN-DkWmPpFXg@mail.gmail.com>
- Sender: email@example.com
On Mon, Jan 9, 2012 at 9:37 AM, Gregg Tavares (wrk) <firstname.lastname@example.org> wrote:
> On Sun, Jan 8, 2012 at 5:59 PM, Vladimir Vukicevic <email@example.com>
>> On Sun, Jan 8, 2012 at 11:37 AM, Benoit Jacob <firstname.lastname@example.org> wrote:
>>> In Firefox <= 10, equal uniform locations give the same
>>> WebGLUniformLocation object, so the location1 === location2 test just works.
>>> We just changed this for Firefox 11 as (per a mailing list discussion)
>>> there was agreement that this wasn't needed, and so the extra code in Gecko
>>> needed to make that work was seen as unneeded complexity.
>>> What is you use case for comparing uniform locations? Why can't you
>>> implement it on your side, maybe with a shim/wrapper around
>> Hrrm, does this mean that:
>> gl.getUniformLocation(prog, "foo") != gl.getUniformLocation(prog, "foo")
> I think
> gl.getUniformLocation(prog, "foo") == gl.getUniformLocation(prog, "foo")
> should be true but
> gl.getUniformLocation(prog, "foo") === gl.getUniformLocation(prog,
> can be false
> although honestly it's not hard to guarantee the second be true as well.
Resurrecting this old thread. Meant to test this some time ago.
At least in current Firefox and Chrome,
gl.getUniformLocation(prog, "foo") == gl.getUniformLocation(prog, "foo")
I don't know what would be required to try to make the "==" operator
work in this case. Web IDL says nothing about equality comparisons
between different host objects. I tried simply defining operator== on
the C++ WebGLUniformLocation class in WebKit, but that had no effect;
If anyone wants to pursue this issue, email@example.com is
probably the best forum.
>> ? That seems really unexpected and very likely to cause hard to untable
>> confusion and bugs. Hashtable (object property) storage especially using
>> uniform locations as keys doesn't seem that unexpected, for example to store
>> the current value or somesuch for optimization purpose.
>> A developer or a library can't just wrap getUniformLocation -- they'd have
>> to track all shaders attached to 'prog', track compilation and linking,
>> etc., because any of those could cause the return value to actually -need-
>> to change. It seems very tricky to get right in a wrapper, and I don't see
>> any reason to dump this complexity on wrappers when a simple hashtable would
>> do it on the implementation side.
>> - Vlad
You are currently subscribed to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: