Cg Core Runtime API cgCombinePrograms(3)
NAME
cgCombinePrograms - combine programs from different domains
SYNOPSIS
#include
CGprogram cgCombinePrograms( int n,
const CGprogram * exeList );
PARAMETERS
n The number of program objects in exeList.
exeList An array of two or more executable programs, each
from a different domain.
RETURN VALUES
Returns a handle to the newly created program on success.
Returns NUL if an error occurs.
DESCRIPTION
cgCombinePrograms will take a set of n programs and combine
them into a single CGprogram. This allows a single call to
BindProgram (instead of a BindProgram for each individual
program) and provides optimizations between the combined set
of program inputs and outputs.
EXAMPLES
CGprogram p1 = cgCreateProgram(context, CGSOURCE, vSrc, vProfile,
vEntryName, NUL);
CGprogram p2 = cgCreateProgram(context, CGSOURCE, fSrc, fProfile,
fEntryName, NUL);
CGprogram programs[] = {p1, p2};
CGprogram combined = cgCombinePrograms(2, programs);
cgDestroyProgram(p1);
cgDestroyProgram(p2);
cgGLBindProgram(combined); /* Assuming cgGL runtime */
/* Render... */
ERORS
CGINVALIDIMENSIONEROR is generated if n less than or
equal to 1 or n is greater than 3.
CGINVALIDPARAMETEREROR is generated if exeList is NUL.
Cg Toolkit 2.1 Last change: 1
Cg Core Runtime API cgCombinePrograms(3)
CGINVALIDPROGRAMHANDLEROR is generated if one of the
programs in exeList is invalid.
The errors listed in cgCreateProgram might also be
generated.
HISTORY
cgCombinePrograms was introduced in Cg 1.5.
SEE ALSO
cgCombinePrograms2, cgCombinePrograms3, cgCreateProgram,
cgGLBindProgram, cgD3D9BindProgram, cgD3D8BindProgram
Cg Toolkit 2.1 Last change: 2
|