   Cg 1.4 error
  I downloaded Cg 1.4 and tried to run the compiler on .cg files.  No matter which .cg file, I get an error "bad argument".  The compiler says it does not like "-profileopts dcls".  In Cg 1.1, you had to use the option "-profileopts dcls" in order to get the DirectX .cg files to compile.  Is there something I need to do differently to get the compiler to produce DirectX output?   
  Are you talking about a Cg compiler, or C++ compiler? If you are talking about a C++ compiler, which one do you use?I use Visual Studio .NET 2003 and have only used Cg with OpenGL, but I have never had to set that option for Cg 1.4.   ;  I guess you have to compile the sources to some vertex/fragment shader assembly supported by DirectX, for example the vs_1_* or ps_2_* profiles. Run 'cgc -?' at your command prompt to figure out which profiles are supported.   ;Quote:Original post by jeroenbI guess you have to compile the sources to some vertex/fragment shader assembly supported by DirectX, for example the vs_1_* or ps_2_* profiles. Run 'cgc -?' at your command prompt to figure out which profiles are supported.I ran 'cgc -' for Cg 1.1, and it lists that vs_1_1 has a profileopts of dcls.  I can call cgCreateProgramFromFile successfully using CG_PROFILE_VS_1_1 and passing arguments "-profileopts dcls".  I ran 'cgc -' for Cg 1.4, and it also lists that vs_1_1 has a profileopts of dcls.  But when I call cgCreateProgramFromFile using CG_PROFILE_VS_1_1 and passing "-profileopts dcls" for the arguments, I get the error about "bad argument".;Quote:Original post by HrethricAre you talking about a Cg compiler, or C++ compiler? If you are talking about a C++ compiler, which one do you use?I use Visual Studio .NET 2003 and have only used Cg with OpenGL, but I have never had to set that option for Cg 1.4.I am talking about the Cg compiler, and the problem I mentioned has to do with generating DirectX output.   ;  I managed to compile my .cg program with Cg 1.4 for both OpenGL (arbvp1,arbfp1) and DirectX (vs_2_0,ps_1_1).  The run of my application shows the DirectX shader programs draw the object correctly.  However, in the OpenGL version, the object does not even appear.  When I swap back in the Cg 1.1 vertex shader for OpenGL, the object does appear.  I think I will just stick with Cg 1.1.Is there another shading language which is known to be more reliable and which produces output for both DirectX and OpenGL?