Cg code