Don't run off the end of generation array

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
Activate a shader before applying uniforms to it

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>