split template function implementation for avoiding imcomplete type.
fix usage of GL3 identifier.
fix build settings.
Merge pull request #56 from rydotyosh/improveBuildForMac6_PR

Improve build for mac