1. add template wrappers for type-dependent opengl functions
2. modify project scons script (and its template) to fix linking issue