NAME
cgGetProgramInput - get the program's input
SYNOPSIS
#include <Cg/cg.h> CGenum cgGetProgramInput( CGprogram program );PARAMETERS
- program
A program handle.
RETURN VALUES
Returns a program input enumerant. If the program is a vertex or fragment program, it returns CG_VERTEX or CG_FRAGMENT, respectively. For geometry programs the input is one of: CG_POINT, CG_LINE, CG_LINE_ADJ, CG_TRIANGLE, or CG_TRIANGLE_ADJ. For tessellation control and evaluation programs the input is CG_PATCH.
Returns CG_UNKNOWN if the input is unknown.
DESCRIPTION
cgGetProgramInput returns the program input enumerant.
EXAMPLES
void printProgramInput(CGprogram program) { char * input = NULL; switch(cgGetProgramInput(program)) { case CG_FRAGMENT: input = "fragment"; break; case CG_VERTEX: input = "vertex"; break; case CG_POINT: input = "point"; break; case CG_LINE: input = "line"; break; case CG_LINE_ADJ: input = "line adjacency"; break; case CG_TRIANGLE: input = "triangle"; break; case CG_TRIANGLE_ADJ: input = "triangle adjacency"; break; case CG_PATCH: input = "patch"; break; default: input = "unknown"; break; } printf("Program inputs %s.\n", input); }ERRORS
CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is not valid program handle.
HISTORY
cgGetProgramInput was introduced in Cg 2.0.
SEE ALSO