Tao.Cg SDK Documentation

Cg.cgCreateProgramFromFile Method 

Creates a Cg program from the specified file.

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

Parameters

context
Current Cg context.
type
Type of source to use.
file
Name of the file to load and compile.
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