NAME

cgGetNumParentTypes - gets the number of parent types of a given type

SYNOPSIS

  #include <Cg/cg.h>

  int cgGetNumParentTypes(CGtype type);

PARAMETERS

type

Specifies the child type.

DESCRIPTION

cgGetNumParentTypes returns the number of parents the child type type inherits from.

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.

RETURN VALUES

Returns the number of parent types. (CGparameter)0 is returned if there are no parents.

ERRORS

This function does not generate any errors.

SEE ALSO

cgGetParentType