MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Direct3D9 Runtime API                   cgD3D9UnloadProgram(3)



NAME
     cgD3D9UnloadProgram - destroy D3D shader and disable use of
     expanded interface routines

SYNOPSIS
       #include 

       HRESULT cgD3D9UnloadProgram( CGprogram program );


PARAMETERS
     program The program for which to disable expanded interface
             management.  The CGprogram handle is still valid
             after this call.

RETURN VALUES
     Returns D3DOK if the function succeeds.

     Returns the D3D failure code if the function fails due to a
     D3D call.

DESCRIPTION
     cgD3D9UnloadProgram destroys the D3D shader for a program
     and disables use of expanded interface routines for that
     program.

     This call does not destroy the CGprogram itself.  It only
     destroys the resources used by the expanded interface, such
     as the D3D shader object and any shadowed parameters. Use
     the core runtime function cgDestroyProgram to free the
     CGprogram itself.  Also note that freeing a CGprogram using
     the core runtime implicitly calls this routine to avoid
     resource leaks.

     This call is only necessary if specific lifetime control of
     expanded interface resources outside the lifetime of their
     associated CGprogram is desired.  For instance, if the
     expanded interface is no longer used, but the CGprogram
     handle will still be used.

EXAMPLES
       / prog is a CGprogram initialized elsewhere
       ...
       HRESULT hres = cgD3D9UnloadProgram(prog);


ERORS
     cgD3D9Failed is generated if a D3D function returns an
     error.

     CGD3D9ERNOTLOADED is returned if program was not loaded
     with the cgD3D9LoadProgram.



Cg Toolkit 2.1            Last change:                          1






Cg Direct3D9 Runtime API                   cgD3D9UnloadProgram(3)



     CGD3D9ERNODEVICE is returned if a required D3D device is
     NUL.  This usually occurs when an expanded interface
     routine is called but a D3D device has not been set with
     cgD3D9SetDevice.

HISTORY
     cgD3D9UnloadProgram was introduced in Cg 1.1.

SEE ALSO
     cgD3D9UnloadAllPrograms, cgDestroyProgram













































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

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