Ejemplo n.º 1
0
    //----------------------------------------------------------------------------

    public bool ShaderConstantExist(PKFxManager.ShaderConstantDesc desc)
    {
        if (m_ShaderConstantList == null)
        {
            return(false);
        }
        foreach (PKFxManager.ShaderConstant attr in this.m_ShaderConstantList)
        {
            if (attr.m_Descriptor.Name == desc.Name && attr.m_Descriptor.Type == desc.Type)
            {
                return(true);
            }
        }
        return(false);
    }
Ejemplo n.º 2
0
    //----------------------------------------------------------------------------

    public PKFxManager.ShaderConstant GetShaderConstantFromDesc(PKFxManager.ShaderConstantDesc desc)
    {
        if (m_ShaderConstantList == null)
        {
            return(null);
        }
        foreach (PKFxManager.ShaderConstant attr in this.m_ShaderConstantList)
        {
            if (attr.m_Descriptor.Name == desc.Name && attr.m_Descriptor.Type == desc.Type)
            {
                return(attr);
            }
        }
        return(null);
    }