Cg glsl profile question.

Is there anything special I have to do to get a shader (defined in a cgfx file) that works fine using arbvp1/arbfp1 to work with glslv/glslf. I am using Cg 1.5 (non beta).

I haven’t tried this on an nvidia card, I am currently working with ati, but my understanding of how the profiles work means that this shouldn’t matter.

Are you having a particular problem with the glsl profiles?

The only thing you should have to do is use glslv and glslf as the profiles after the compile part in the program state assignment.

A quick example:

void vert( inout float4 pos : POSITION )
{
   pos = pos * 2.0;
}

void frag( out float4 col : COLOR )
{
   col = float4( 1.0, 0.0, 0.0, 1.0 );
}

technique t0
{
   pass p0
   {
       VertexProgram = compile glslv vert();
       FragmentProgram = compile glslf frag();
   }
}