opengl: properly enforce uniform component limits
Rather than just checking num_variables
, check the actual uniform
component count. Should be compatible with GL 2.1, GLES 2.0 and GLES 3.0
and (respectively) do the correct thing.
Fixes an issue where large uniform LUTs could exceed the uniform location count.