MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                             cgSetArraySize(3)



NAME
     cgSetArraySize - sets the size of a resizable array
     parameter

SYNOPSIS
       #include 

       void cgSetArraySize( CGparameter param,
                            int size );


PARAMETERS
     param   The array parameter handle.

     size    The new size of the array.

RETURN VALUES
     None.

DESCRIPTION
     cgSetArraySize sets the size of a resiable array parameter
     param to size.

EXAMPLES
     If you have Cg program with a parameter like this :

       /* ... */

       float4 main(float4 myarray[])
       {
         /* ... */
       }

     You can set the size of the myarray array parameter to 5
     like so :

       CGparameter arrayParam =
         cgGetNamedProgramParameter(program, CGPROGRAM, "myarray");

       cgSetArraySize(arrayParam, 5);


ERORS
     CGINVALIDPARAMHANDLEROR is generated if param is not a
     valid parameter.

     CGARAYPARAMEROR is generated if param is not an array
     parameter.

     CGARAYHASWRONGDIMENSIONEROR is generated if the
     dimension of the array parameter param is not 1.




Cg Toolkit 2.1            Last change:                          1






Cg Core Runtime API                             cgSetArraySize(3)



     CGPARAMETERISNOTRESIZABLEARAYEROR is generated if
     param is not a resizable array.

     CGINVALIDPARAMETEREROR is generated if size is less than
     0000.

HISTORY
     cgSetArraySize was introduced in Cg 1.2.

SEE ALSO
     cgGetArraySize, cgGetArrayDimension, cgSetMultiDimArraySize












































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

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