   Cg Vs GLSL
  Hi! I'm new on shaders, and the target is to write a 3D Engine on OPENGL only.That Engine must have the lastest techniques for materials and effects (Taking advantage of the lastest NVidia and ATI cards with SM3.0), but it must be compatible for mainstream hardware (GForce2,GForce3,GForce4,GForce5FX, ATI radeon 8500, laptops, Intel Graphics, Matrox ). Is needed to support the same effects and shaders in many harware profiles. Well, so why I insists on support low profile hardware? Because Gamers are the reason! I meet many gamers who don't know what kind of hardware they have. Most of them think that having a Pentium4 is enough for games! Honestly, only a IT guy  knows that it would better buy a GForceFX6800 for a gamming experience.Also, consoles are in mind too. PS2, PSP, Nintendo DS and some handled phones support OpenGL, mostly OpenGL1.3 than OpenGL2.0So, where to start ? GLSL promise high performance and flexibility, but NVidiaCg does a good job. And remember that Cg is now compatible with every card that have ARBVertexProgram extention, and it has implementations in many OS.   
  You can use NVidia's Cg compiler to produce GLSL code, just use the -oglsl flag redirecting the output to a file, then use the file in your OpenGL program:cgc -oglsl shader.cg >> shader.glslNo need to even link against the Cg libraries.Edit: No, actually I am not sure, I think you can produce ASM you can use without the Cg libraries, but not sure about GLSL, I need to find out about that.   ;  this will produce arbfp asm code.   ;  So, It seems that is better work on Cg shaders,because it guaranties that the same shader code will run in many plattforms (Dx8,Dx9,Dx10,arbfp & arbvp,GLSL) and it has implementations on linux and Mac. Also I can use the .FX files for produce complex effects, with the Cg runtime library. Thanks!   