winniepooh07
06-15-2007, 01:46 AM
Hi there,
I'm using the Cg API 1.5 and Cg effect files for rendering. Now I need to get the fragment program used by a pass. How am I doing this? I can't find a function in the (damn) API documentation.
So, my effect looks something like:
float4 FP(float3 texCoord : TEXCOORD0) : COLOR
{
return float4(texCoord,1);
}
technique T1
{
pass
{
VertexProgram = NULL;
FragmentProgram = compile arbfp1 FP();
CullFaceEnable = false;
}
}
And I have a CGpass handle in my application. Now I need something that gives me a CGprogram handle for the fragment program. Any ideas?
Cheers,
Felix
I'm using the Cg API 1.5 and Cg effect files for rendering. Now I need to get the fragment program used by a pass. How am I doing this? I can't find a function in the (damn) API documentation.
So, my effect looks something like:
float4 FP(float3 texCoord : TEXCOORD0) : COLOR
{
return float4(texCoord,1);
}
technique T1
{
pass
{
VertexProgram = NULL;
FragmentProgram = compile arbfp1 FP();
CullFaceEnable = false;
}
}
And I have a CGpass handle in my application. Now I need something that gives me a CGprogram handle for the fragment program. Any ideas?
Cheers,
Felix
