1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| #include <Cg/cg.h> | int main(int argc, char *argv[]) | { | char const* args [] = { | "args_1", | "args_2", | "args_3", | "args_4", | 0}; | CGprogram prog = cgCreateProgram( | 0, | CG_IN, | "program", | CG_PROFILE_START, | "entry", | args); | CGparameter param = cgGetFirstParameter(prog, CG_IN); | CGeffect geffect = cgGetParameterEffect(param); | CGtechnique gtechnique = cgGetFirstTechnique(geffect); | CGpass gpass = cgGetFirstPass(gtechnique); | CGstateassignment gstateassignment = cgGetFirstStateAssignment(gpass); | CGstate gstate = cgGetStateAssignmentState(gstateassignment); | CGcontext gcontext = cgGetStateContext(gstate); | cgCreateArraySamplerState( | gcontext, | "name", | CG_STRUCT, | 1); //target call | return 0; | } |
|