Thanks for the valuable feedback. It seems reasonable that since this does not add any new features to the language, #extension should not be used. #pragma might still be better than the enable/disable switch. From an implementation perspective, that encapsulates the functionality better inside the shader compiler. For the user, it's easier to understand - there can be no confusion regarding whether the flag should be set when linkProgram is called, for example. It's also more flexible. They can simply add the getExtension() call and then narrow down problems by only editing shaders if they wish, or they can add a parameter to their compileShader() code path that toggles inserting the pragma to shader code.
So I'll submit an amendment adding a #pragma webgl_debug_shader_precision directive, if you have strong objections to this please raise them.
-Olli
________________________________________
From: Mark Callow <khronos@callow.im>
Sent: Saturday, November 8, 2014 3:40 AM
To: Kenneth Russell
Cc: Florian Bösch; Olli Etuaho; public_webgl@khronos.org
Subject: Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal
>
> t does seem better if the shaders
> don't have to be modified in order to take advantage of this
> extension.
>
I agree.
Another point is that #extension is intended for language extensions and this is arguably not a language extension. I think being able to enable and disable this in the API between calls to compileShader is the best approach.
Regards
-Mark
-----------------------------------------------------------
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:
unsubscribe public_webgl
-----------------------------------------------------------