NAME

cgIsProgram - determine if a program handle references a program object

SYNOPSIS

  #include <Cg/cg.h>

  CGbool cgIsProgram( CGprogram program );

PARAMETERS

program

The program handle to check.

RETURN VALUES

Returns CG_TRUE if program references a valid program object.

Returns CG_FALSE otherwise.

DESCRIPTION

cgIsProgram return CG_TRUE if program references a valid program object. Note that this does not imply that the program has been successfully compiled.

EXAMPLES

  char *programSource = ...;
  CGcontext context = cgCreateContext();
  CGprogram program = cgCreateProgram( context, 
                                       CG_SOURCE, 
                                       programSource, 
                                       CG_PROFILE_ARBVP1,
                                       "myshader",
                                       NULL );
  CGbool isProgram = cgIsProgram( program );

ERRORS

None.

HISTORY

cgIsProgram was introduced in Cg 1.1.

SEE ALSO

cgCreateProgram, cgDestroyProgram, cgGetNextProgram