Name
cgCopyProgram - make a copy of a program object
Synopsis
#include <Cg/cg.h>
CGprogram cgCopyProgram( CGprogram program );
Parameters
- program
-
The program object to copy.
Return Values
Returns a copy of program on success.
Returns NULL if program is invalid or the copy fails.
Description
cgCopyProgram creates a new program object that is a copy
of program and adds it to the same context as program.
cgCopyProgram is useful for creating a new instance of a
program whose parameter properties have been modified by the
run-time API.
Examples
CGprogram programCopy = cgCopyProgram(program);
Errors
CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program
is not a valid program handle.
History
cgCopyProgram was introduced in Cg 1.1.
cgCopyProgram is operational as of Cg 3.0.
See Also
cgCreateProgram,
cgDestroyProgram
|