Exemplo n.º 1
0
        public EAnalyzeStageStatus Init(AnalyzeWrap wrap, ShaderAnalyzeParams param)
        {
            m_AnalyzeWrap = wrap;
            m_Params      = param;

            int amount = init(wrap, param);
            EAnalyzeStageStatus status = EAnalyzeStageStatus.Success;

            switch (amount)
            {
            case InitComplete:
                status = EAnalyzeStageStatus.Complete;
                break;

            case InitUnknown:
                status = EAnalyzeStageStatus.Success;
                break;

            case InitError:
                status = EAnalyzeStageStatus.Error;
                break;

            case InitFinish:
                status = EAnalyzeStageStatus.Finish;
                break;

            default:
                status = EAnalyzeStageStatus.Success;
                Amount = amount;
                break;
            }

            return(status);
        }
Exemplo n.º 2
0
        public void Clear()
        {
            clear();

            m_Params      = null;
            m_AnalyzeWrap = null;
            Amount        = 0;
            CurrentIndex  = 0;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 子类实现的初始化方法
 /// </summary>
 /// <param name="wrap"></param>
 /// <param name="param"></param>
 /// <returns>总计要执行的次数,负数代表发生错误,0代表不需要Execute,int.MinValue代表解析完成,int.MaxValue代表执行次数未知由派生类自行决定</returns>
 protected virtual int init(AnalyzeWrap wrap, ShaderAnalyzeParams param)
 {
     return(int.MaxValue);
 }
Exemplo n.º 4
0
 protected override int init(AnalyzeWrap wrap, ShaderAnalyzeParams param)
 {
     return(wrap.Passes.Count);
 }