An attempt to implement Cg algorithms with modern OpenGL