Name
cgSetCompilerIncludeString - add shader source string to context
Synopsis
#include <Cg/cg.h> void cgSetCompilerIncludeString( CGcontext context, const char *name, const char *source );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.
- source
- Shader source code string.
Return Values
None.
Description
Each Cg runtime context maintains a virtual file system of shader source code for inclusion by the compiler. cgSetCompilerIncludeString populates source code into the virtual filesystem. A name is removed from the virtual filesystem by using NULL for the source. 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.
History
cgSetCompilerIncludeString was introduced in Cg 2.1.
See Also
cgSetCompilerIncludeFile, cgGetCompilerIncludeCallback, cgSetCompilerIncludeCallback