public void Destroy()
 {
     m_blendData       = null;
     m_blendData1      = null;
     m_blendData2      = null;
     m_blendData3      = null;
     m_alphaToMaskData = null;
     m_cullModeData    = null;
     m_colorMaskData   = null;
     m_colorMaskData1  = null;
     m_colorMaskData2  = null;
     m_colorMaskData3  = null;
     m_stencilData     = null;
     m_depthData       = null;
     m_tagData.Destroy();
     m_tagData         = null;
     m_globalsTag      = null;
     m_srpBatcherTag   = null;
     m_allModulesTag   = null;
     m_functionsTag    = null;
     m_pragmaTag       = null;
     m_pragmaBeforeTag = null;
     m_passTag         = null;
     m_inputsVertTag   = null;
     m_inputsFragTag   = null;
     m_includePragmaContainer.Destroy();
     m_includePragmaContainer = null;
 }
Beispiel #2
0
        void AddToDataCollector(ref MasterNodeDataCollector dataCollector, TemplateIncludePragmaContainter nativesContainer, bool fromSF)
        {
            List <AdditionalDirectiveContainer> list = fromSF ? m_shaderFunctionDirectives : m_additionalDirectives;
            int count = list.Count;

            for (int i = 0; i < count; i++)
            {
                int orderIdx = fromSF ? 1 : (i > m_nativeDirectivesIndex ? 1 : -1);
                switch (list[i].LineType)
                {
                case AdditionalLineType.Include:
                {
                    string value = list[i].Value;
                    if (!string.IsNullOrEmpty(value) &&
                        !nativesContainer.HasInclude(value))
                    {
                        dataCollector.AddToDirectives(list[i].FormattedValue, orderIdx);
                    }
                }
                break;

                case AdditionalLineType.Define:
                {
                    if (!string.IsNullOrEmpty(list[i].LineValue) &&
                        !nativesContainer.HasDefine(list[i].LineValue))
                    {
                        dataCollector.AddToDirectives(list[i].FormattedValue, orderIdx);
                    }
                }
                break;

                case AdditionalLineType.Pragma:
                {
                    if (!string.IsNullOrEmpty(list[i].LineValue) &&
                        !nativesContainer.HasPragma(list[i].LineValue))
                    {
                        dataCollector.AddToDirectives(list[i].FormattedValue, orderIdx);
                    }
                }
                break;

                default:
                case AdditionalLineType.Custom:
                    dataCollector.AddToDirectives(list[i].LineValue, orderIdx);
                    break;
                }
            }
        }
Beispiel #3
0
        public void AddAllToDataCollector(ref MasterNodeDataCollector dataCollector, TemplateIncludePragmaContainter nativesContainer)
        {
            //List<AdditionalDirectiveContainer> list = m_additionalDirectives;
            //int count = list.FindIndex( x => x.Origin.Equals( AdditionalContainerOrigin.Native ) );
            //for( int i = 0; i < count; i++ )
            //{
            //	switch( list[ i ].LineType )
            //	{
            //		case AdditionalLineType.Include:
            //		{
            //			string value = list[ i ].Value;
            //			if( !string.IsNullOrEmpty( value ) &&
            //			  !nativesContainer.HasInclude( value ) )
            //			{
            //				dataCollector.AddToMisc( list[ i ].FormattedValue );
            //			}
            //		}
            //		break;
            //		case AdditionalLineType.Define:
            //		{
            //			if( !string.IsNullOrEmpty( list[ i ].LineValue ) &&
            //			  !nativesContainer.HasDefine( list[ i ].LineValue ) )
            //			{
            //				dataCollector.AddToMisc( list[ i ].FormattedValue );
            //			}
            //		}
            //		break;
            //		case AdditionalLineType.Pragma:
            //		{
            //			if( !string.IsNullOrEmpty( list[ i ].LineValue ) &&
            //			  !nativesContainer.HasPragma( list[ i ].LineValue ) )
            //			{
            //				dataCollector.AddToMisc( list[ i ].FormattedValue );
            //			}
            //		}
            //		break;
            //		default:
            //		case AdditionalLineType.Custom:
            //		dataCollector.AddToMisc( list[ i ].LineValue );
            //		break;
            //	}
            //}

            AddToDataCollector(ref dataCollector, nativesContainer, false);
            AddToDataCollector(ref dataCollector, nativesContainer, true);
        }
Beispiel #4
0
 public void Destroy()
 {
     m_blendData     = null;
     m_cullModeData  = null;
     m_colorMaskData = null;
     m_stencilData   = null;
     m_depthData     = null;
     m_tagData.Destroy();
     m_tagData       = null;
     m_globalsTag    = null;
     m_functionsTag  = null;
     m_pragmaTag     = null;
     m_passTag       = null;
     m_inputsVertTag = null;
     m_inputsFragTag = null;
     m_includePragmaContainer.Destroy();
     m_includePragmaContainer = null;
 }
Beispiel #5
0
        public override void AddToDataCollector(ref MasterNodeDataCollector dataCollector, TemplateIncludePragmaContainter nativesContainer)
        {
            for (int i = 0; i < m_additionalItems.Count; i++)
            {
                if (!string.IsNullOrEmpty(m_additionalItems[i]) && !nativesContainer.HasPragma(m_additionalItems[i]))
                {
                    dataCollector.AddToPragmas(-1, m_additionalItems[i]);
                }
            }

            for (int i = 0; i < m_outsideItems.Count; i++)
            {
                if (!string.IsNullOrEmpty(m_outsideItems[i]) && !nativesContainer.HasPragma(m_outsideItems[i]))
                {
                    dataCollector.AddToPragmas(-1, m_outsideItems[i]);
                }
            }
        }
		public virtual void AddToDataCollector( ref MasterNodeDataCollector dataCollector , TemplateIncludePragmaContainter nativesContainer ) { }
Beispiel #7
0
 public void AddAllToDataCollector(ref MasterNodeDataCollector dataCollector, TemplateIncludePragmaContainter nativesContainer)
 {
     AddToDataCollector(ref dataCollector, nativesContainer, false);
     AddToDataCollector(ref dataCollector, nativesContainer, true);
 }