Name
cgSetCompilerIncludeFile - add shader source file to context
Synopsis
#include <Cg/cg.h>
void cgSetCompilerIncludeFile( CGcontext context, const char *name, const char *filename );
Parameters
- context
-
The context in which to add the source code for inclusion by the compiler.
- name
-
The virtual file system name of the shader source.
- filename
-
System file system name of shader source file.
Return Values
None.
Description
Each Cg runtime context maintains a virtual filesystem of shader source code for inclusion by the compiler.
cgSetCompilerIncludeFile populates source code into the virtual filesystem from a file.
A name is removed from the virtual filesystem by using NULL for the filename.
The virtual filesystem is completely cleared by using NULL for the name.
Examples
Errors
CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.
CG_FILE_READ_ERROR is generated if the file filename can not be opened for input.
History
cgSetCompilerIncludeFile was introduced in Cg 2.1.
See Also
cgSetCompilerIncludeString,
cgGetCompilerIncludeCallback,
cgSetCompilerIncludeCallback
|