Cg algorithms with modern OpenGL