Switched OpenGL 3 to scalar precision and fixed bugs.