Cg has been superceeded by GLSL ( OpenGl, WebGl, Shadertoy )  and HLSL ( Direct3D)   

Główny program w C dla CPU, ładuje i uruchamia program w Cg dla GPU [1][2][3]

Pliki nagłówkowe

edytuj

W głównym programie w C dodaj:[4]

#include <Cg/cg.h> /* To include the core Cg runtime API into your  program */
#include <Cg/cgGL.h>  /* to include the OpenGL-specific Cg runtime API */
  1. Lesson: 47 from NeHe Productions
  2. Cg Bumpmapping by Razvan Surdulescu at GameDev
  3. Cg & HLSL Shading Language FAQ (by Fusion Industries)
  4. http://http.developer.nvidia.com/CgTutorial/cg_tutorial_appendix_b.html NVidia Cg tutorial. Appendix B. The Cg Runtime