OpenGLS bug fixes

This pull request fixes some issues detected by apitrace:

* missing glViewport() call
 * apitrace can't determine the drawable size
 * fixes #935

* wrong setUniform call used for alphaRef