Port warning and style fixes from VolumeOpenGL2

This change fixes unused-but-set-variable warnings.
It also addresses disparate conventions in shader code.

Change-Id: I4c8f3ede7ca853153d5ad217cdf956203fb4fcb7
Merge topic 'volumeopenglnew_fixes' into master

857241a0 Port warning and style fixes from VolumeOpenGL2