[Public WebGL] Null return values from create*

Kenneth Russell [email protected]
Wed Apr 4 18:39:11 PDT 2012

On Wed, Apr 4, 2012 at 6:21 PM, Glenn Maynard <[email protected]> wrote:
> On Wed, Apr 4, 2012 at 8:00 PM, Kenneth Russell <[email protected]> wrote:
>> Glenn, thanks for raising this issue again. After giving this more
>> thought I am increasingly in favor of your proposal to return
>> invalidated WebGLObjects from the create* methods if the context is
>> lost, because of the unification of error handling behavior.
>> There are some things to consider. It will still be the case that some
>> get* methods will return null values in certain situations, in
>> particular when passed invalidated objects (per
>> http://www.khronos.org/registry/webgl/specs/latest/#5.14). Is this an
>> issue? If the goal is to eliminate the majority of null return values
>> under error conditions, that is a much larger change, and one which I
>> think should be done incrementally.
> The goal here is just to eliminate the extremely rare, racey case where
> create* functions return null, and as a side-effect to reduce the number of
> branches in user code that need to be tested.  If you create and use a
> texture, there are only two major cases related to context loss instead of
> an exceptionally rare third.  That rare third case is hard to test
> comprehensively even with use of WEBGL_lose_context.
> Reducing the cases where null is returned by other functions is worth
> looking into, too, but let's come back to those another time.

OK, good.

All, please consider this and post thoughts.


You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list