If this question is too Cg specific, then I apoligize and will try to find a more Cg-specialized forum somewhere.
I try to run a Cg program that uses branching, but I can’t get the fp40 profile working correctly. If I run this code:
assert(cgGLIsProfileSupported(CG_FRAGMENT_FP40));
cgGLEnableProfile(CG_FRAGMENT_FP40);
fragProg = cgCreateProgramFromFile(context, CG_SOURCE, filename, CG_FRAGMENT_FP40, "big_frag_prog", 0);
assert(cgIsProgram(fragProg));
cgGLLoadProgram(fragProg); // This line fails!
The last line fails with:
Compiling Cg fragment program: big_frag_prog
Cg error:
CG ERROR : The program could nod load.
(0) : warning C6504: Unknown profile option 'NumTexInstructionSlots' ignored
(0) : warning C6504: Unknown profile option 'NumMathInstructionSlots' ignored
(0) : warning C6504: Unknown profile option 'MaxTexIndirections' ignored
(0) : warning C6504: Unknown profile option 'MaxDrawBuffers' ignored
The profile options it mentions belongs to the arbfp1 profile (at least according to ‘cgc --help’), so I think it somehow tries to compile using the arbfp1 profile anyway. Anyone have any idea what the problem could be?
I have initialized both GL_ARB_FRAGMENT_PROGRAM and GL_NV_FRAGMENT_PROGRAM2.
I use Cg 1.4.0-rc1 (the latest, I think).