PDA

View Full Version : CgFx: Get program used by pass


winniepooh07
06-15-2007, 02: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

CGTalk Moderation
06-15-2007, 02:46 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.