NAME

cgGetFirstProgram - get the first program in a context

SYNOPSIS

  #include <Cg/cg.h>

  CGprogram cgGetFirstProgram( CGcontext ctx );

PARAMETERS

ctx

Specifies the context to retrieve the first program from.

DESCRIPTION

cgGetFirstProgram is used to begin iteration over all of the programs contained within a context. See the "cgGetNextProgram" document for more information.

RETURN VALUES

cgGetFirstProgram returns a the first CGprogram object in ctx. If ctx cointains no programs, NULL is returned.

ERRORS

CG_INVALID_CONTEXT_HANDLE_ERROR is generated if ctx does not refer to a valid context.

SEE ALSO

the "cgGetNextProgram" document, the "cgCreateProgram" document, the "cgDestroyProgram" document, and the "cgIsProgram" document