MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                           cgCompileProgram(3)



NAME
     cgCompileProgram - compile a program object

SYNOPSIS
       #include 

       void cgCompileProgram( CGprogram program );


PARAMETERS
     program The program object to compile.

RETURN VALUES
     None.

DESCRIPTION
     cgCompileProgram compiles the specified Cg program for its
     target profile.  A program must be compiled before it can be
     loaded (by the API-specific part of the runtime). It must
     also be compiled before its parameters can be inspected.

     The compiled program can be retrieved as a text string by
     passing CGCOMPILEDPROGRAM to cgGetProgramString.

     Certain actions invalidate a compiled program and the
     current value of all of its parameters.  If one of these
     actions is performed, the program must be recompiled before
     it can be used.  A program is invalidated if the program
     source is modified, if the compile arguments are modified,
     or if the entry point is changed.

     If one of the parameter bindings for a program is changed,
     that action invalidates the compiled program, but does not
     invalidate the current value of the program's parameters.

EXAMPLES
       if(!cgIsProgramCompiled(program))
        cgCompileProgram(program);


ERORS
     CGINVALIDPROGRAMHANDLEROR is generated if program is
     not a valid program handle.

     CGCOMPILEREROR is generated if compilation fails.

HISTORY
     cgCompileProgram was introduced in Cg 1.1.

SEE ALSO
     cgIsProgramCompiled, cgCreateProgram, cgGetNextParameter,
     cgIsParameter, cgGetProgramString



Cg Toolkit 2.1            Last change:                          1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™