(varinfo)
return shader_type
Return the GLSL variable declaration statement from a variable 
    information.
    
    Arguments:
      * varinfo: a dictionary with the information about the variable,
        in particular the type (int/float) and the number of dimensions
        (scalar, vector or matrix).
    
    Returns:
      * declaration: the string containing the variable declaration.
Return the GLSL variable declaration statement from a variable 
    information.
    
    Arguments:
      * varinfo: a dictionary with the information about the variable,
        in particular the type (int/float) and the number of dimensions
        (scalar, vector or matrix).
    
    Returns:
      * declaration: the string containing the variable declaration.
Return the GLSL variable declaration statement from a variable information . Arguments : * varinfo : a dictionary with the information about the variable in particular the type ( int / float ) and the number of dimensions ( scalar vector or matrix ) . Returns : * declaration : the string containing the variable declaration .
def _get_shader_type(varinfo):
    """Return the GLSL variable declaration statement from a variable 
    information.
    
    Arguments:
      * varinfo: a dictionary with the information about the variable,
        in particular the type (int/float) and the number of dimensions
        (scalar, vector or matrix).
    
    Returns:
      * declaration: the string containing the variable declaration.
        
    """
    if type(varinfo["ndim"]) == int or type(varinfo["ndim"]) == long:
        if varinfo["ndim"] == 1:
            shader_type = varinfo["vartype"]
        elif varinfo["ndim"] >= 2:
            shader_type = "vec%d" % varinfo["ndim"]
            if varinfo["vartype"] != "float":
                shader_type = "i" + shader_type
    # matrix: (2,2) or (3,3) or (4,4)
    elif type(varinfo["ndim"]) == tuple:
        shader_type = "mat%d" % varinfo["ndim"][0]
    return shader_type
def _get_shader_type ( varinfo ) : if type ( varinfo [ "ndim" ] ) == int or type ( varinfo [ "ndim" ] ) == long : if varinfo [ "ndim" ] == 1 : shader_type = varinfo [ "vartype" ] elif varinfo [ "ndim" ] >= 2 : shader_type = "vec%d" % varinfo [ "ndim" ] if varinfo [ "vartype" ] != "float" : shader_type = "i" + shader_type # matrix: (2,2) or (3,3) or (4,4) elif type ( varinfo [ "ndim" ] ) == tuple : shader_type = "mat%d" % varinfo [ "ndim" ] [ 0 ] return shader_type