arturoc/openFrameworks — pull request #14 by tgfrerer (2013-06-10 16:06:59+00:00)
Title: optimise ofShader

+ caches uniformLocations upon their first call within their associated ofShader object

+ any call to glGet* forces the GL pipeline to flush and is therefore exceedingly expensive (mainly because flushes cancel out GPU otimisations)

+ caching the uniform locations in ofShader alone leads to a 16% speed increase on programmableGL/GLES2.0 (raspberry pi)

Signed-off-by: tgfrerer