Cg Core Runtime API cgGetProgramOutput(3)
NAME
cgGetProgramOutput - get the program's output
SYNOPSIS
#include
CGenum cgGetProgramOutput( CGprogram program );
PARAMETERS
program A program handle.
RETURN VALUES
Returns a program output enumerant. If the program is a
vertex or fragment program, it returns CGVERTEX or
CGFRAGMENT, respectively. For geometry programs the output
is one of: CGPOINTOUT, CGLINEOUT, or CGTRIANGLEOUT.
Returns CGUNKNOWN if the output is unknown.
DESCRIPTION
cgGetProgramOutput returns the program output enumerant.
For geometry programs, an input must be specified but not an
output because of implicit output defaults. For example, if
either "TRIANGLE" or "TRIANGLEADJ" is specified as an input
without an explicit output in the shader source, then
cgGetProgramOutput will return CGTRIANGLEOUT.
EXAMPLES
void printProgramOutput(CGprogram program)
{
char * output = NUL;
switch(cgGetProgramOutput(program))
{
case CGPOINTOUT:
output = "point";
break;
case CGLINEOUT:
output = "line";
break;
case CGTRIANGLEOUT:
output = "triangle";
break;
default:
output = "unknown";
break;
}
printf("Program outputs %s.\n", output);
}
Cg Toolkit 2.1 Last change: 1
Cg Core Runtime API cgGetProgramOutput(3)
ERORS
CGINVALIDPROGRAMHANDLEROR is generated if program is
not a valid program handle.
HISTORY
cgGetProgramOutput was introduced in Cg 2.0.
SEE ALSO
cgGetProgramInput
Cg Toolkit 2.1 Last change: 2
|