NAME

cgGetProgramString - get strings from a program object

SYNOPSIS

  #include <Cg/cg.h>

  const char * cgGetProgramString( CGprogram prog, CGenum pname );

PARAMETERS

prog

Specifies the Cg program to query.

pname

Specifies the string to retrieve. pname can be one of CG_PROGRAM_SOURCE, CG_PROGRAM_ENTRY, CG_PROGRAM_PROFILE, or CG_COMPILED_PROGRAM.

DESCRIPTION

cgGetProgramString allows the application to retrieve program strings that have been set via functions that modify program state.

When pname is CG_PROGRAM_SOURCE the original Cg source program is returned.

When pname is CG_PROGRAM_ENTRY the main entry point for the program is returned.

When pname is CG_PROGRAM_PROFILE the profile for the program is returned.

When pname is CG_COMPILED_PROGRAM, the string for the compiled program is returned.

ERRORS

CG_INVALID_PROGRAM_HANDLE_ERROR is generated if prog does not refer to a valid program.

CG_INVALID_ENUMERANT_ERROR is generated if pname is an invalid enumerant.

SEE ALSO

the "cgCreateProgram" document, the "cgGetProgramOptions" document