Pull request #980
Closes #980
Fix ShadowMappingTest
Merge pull request #1006 from xoppa/3dapi

Pull #980 and fix ShadowMappingTest