Tao.Cg SDK Documentation

Cg.cgCreateProgram Method 

Compiles and creates a Cg program.

[Visual Basic]
Public Shared Function cgCreateProgram( _
   ByVal context As IntPtr, _
   ByVal type As Integer, _
   ByVal source As String, _
   ByVal profile As Integer, _
   ByVal entry As String, _
   ByVal args As String() _
) As IntPtr
[C#]
public static IntPtr cgCreateProgram(
   IntPtr context,
   int type,
   string source,
   int profile,
   string entry,
   string[] args
);

Parameters

context
Current Cg context.
type
Type of source to use.
source
Source Cg code.
profile
Profile to use for compiling the program.
entry
Entry point of the specified Cg source. If null, then 'main' is assumed.
args
Optional args to pass to the compiler.

Return Value

Handle to the newly created Cg program.

See Also

Cg Class | Tao.Cg Namespace