[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Exceptions in WebGL
On Apr 5, 2010, at 1:21 AM, Cedric Vivier wrote:
> On Mon, Apr 5, 2010 at 15:23, Gregg Tavares <firstname.lastname@example.org> wrote:
> ctx.getActiveUniform(validProgram, invalidIndex); exception or INVALID_VALUE?
> ctx.getActiveUniform(null, 0); // This must be INVALID_VALUE but the spec doesn't stay
> ctx.getActiveUniform(validProgramFromDifferenceContext, 0); // exception or INVALID_VALUE
> ctx.getActiveUniform(deletedProgram, 0); // exception or INVALID_VALUE?
> ctx.getActiveUniform(undefined, 0); // exception or INVALID_VALUE?
> ctx.getActiveUniform(texture, 0); // exception or INVALID_OPERATION
> Pretty much every function has the same issues.
> Should this be nailed down? Am I just missing the section that covers it?
> When errors are not defined specifically in WebGL spec doesn't this mean errors as defined in OpenGL ES spec must be generated ?
> I guess a section describing this should be added if all possible errors are not defined in the WebGL spec itself.
> Also I think it would be a good idea to improve consistency with regards to the use of "raise" in the spec, currently this verb is often used for both errors and exceptions, eg. "raises an INVALID_VALUE error" and "raises an exception", I believe it would be better not to use "raise" for errors since this verb is mostly used for exceptions only in other contexts (programming languages) and, perhaps more importantly, since OpenGL specs are using "generate" instead (eg. "generates an INVALID_VALUE error").
The OpenGL ES spec uses the term "generated" to indicate that an error is recorded, but no error is returned and no exception is raised. So I think using "raise" for exceptions and "generate" for GL errors would be the most appropriate.
You are currently subscribe to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: