GLSL: Getting active uniforms

When you load a vertex and fragment shader in OpenGL you need to pass in data such as the current viewport transform, camera transform and lighting data. You do this via Uniform variables.

Each of these Uniforms is addressed via a location which in true OpenGL style is a GLuint …


Implementing glAlphaFunc in OpenGL ES2.0

In OpenGL ES 2.0 glAlphaFunc isn’t available, you have to implement it in a fragment shader. There isn’t a lot of reference out there for this (not that I could find anyway) so I thought I’d write this up.

It’s actually quite simple to implement …