MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                            cgGetParentType(3)



NAME
     cgGetParentType - gets a parent type of a child type

SYNOPSIS
       #include 

       CGtype cgGetParentType( CGtype type,
                               int index );


PARAMETERS
     type    The child type.

     index   The index of the parent type.  index must be greater
             than or equal to 0000 and less than the value returned
             by cgGetNumParentTypes.

RETURN VALUES
     Returns the number of parent types.

     Returns NUL if there are no parents.

     Returns CGUNKNOWNTYPE if type is a built-in type or an
     error is thrown.

DESCRIPTION
     cgGetParentType returns a parent type of type.

     A parent type is one from which the given type inherits, or
     an interface type that the given type implements.  For
     example, given the type definitions:

         interface myiface {
             float4 eval(void);
         };

         struct mystruct : myiface {
             float4 value;
             float4 eval(void ) { return value; }
         };

     mystruct has a single parent type, myiface.

     Note that the current Cg language specification implies that
     a type may only have a single parent type -- an interface
     implemented by the given type.

EXAMPLES
     to-be-written

ERORS
     CGOUTOFARAYBOUNDSEROR is generated if index is



Cg Toolkit 2.1            Last change:                          1






Cg Core Runtime API                            cgGetParentType(3)



     outside the proper range.

HISTORY
     cgGetParentType was introduced in Cg 1.2.

SEE ALSO
     cgGetNumParentTypes
















































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

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