[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Null return values from create*
On Wed, Apr 4, 2012 at 9:18 PM, Gregg Tavares (勤) <email@example.com>
Where are all the places one would return these invalid objects?
getUniformLocation seems a little weird in that passing it a uniform that does not exist returns NULL but passing it a uniform after context lost returns an invalid location? Or still NULL?
We're only really talking about functions that return WebGLObject subclasses, since those are the ones that have an invalidated flag to use instead of a null return value. WebGLUniformLocation and WebGLActiveInfo don't have an invalidated state, since it's not a WebGLObject. I'd look at these later, if we start looking at reducing other null return values.
how about getParameter?
getParameter is hard, since there are a lot of possible arguments with varying reasonable "placeholder" results. I'd defer this, too.
While I'm thinking about it: does getParameter() define that values like MAX_VIEWPORT_DIMS and VIEWPORT always return a new object, as opposed to returning the same object each time?