Is there any way to check if a GLSL extension has been enabled? That is, that there has been a #extension <extname> : enable
directive somewhere before a block of code in the current compilation unit:
#extension GL_OES_standard_derivatives : enable
Something like this:
#if extension_enabled( GL_OES_standard_derivatives )
// do stuff with fwidth()
#else
#error Code won't work without GL_OES_standard_derivatives!
#endif