void FetchInfoFromTemplate()
        {
            if (m_currentTemplate.BlendData.DataCheck == TemplateDataCheck.Valid)
            {
                m_blendOpHelper.ConfigureFromTemplateData(m_currentTemplate.BlendData);
            }

            if (m_currentTemplate.AlphaToMaskData.DataCheck == TemplateDataCheck.Valid)
            {
                m_alphaToMaskHelper.ConfigureFromTemplateData(m_currentTemplate.AlphaToMaskData);
            }

            if (m_currentTemplate.CullModeData.DataCheck == TemplateDataCheck.Valid)
            {
                m_cullModeHelper.ConfigureFromTemplateData(m_currentTemplate.CullModeData);
            }

            if (m_currentTemplate.ColorMaskData.DataCheck == TemplateDataCheck.Valid)
            {
                m_colorMaskHelper.ConfigureFromTemplateData(m_currentTemplate.ColorMaskData);
            }

            if (m_currentTemplate.StencilData.DataCheck == TemplateDataCheck.Valid)
            {
                m_stencilBufferHelper.ConfigureFromTemplateData(m_currentTemplate.StencilData);
            }

            if (m_currentTemplate.DepthData.DataCheck == TemplateDataCheck.Valid)
            {
                m_depthOphelper.ConfigureFromTemplateData(m_currentTemplate.DepthData);
            }

            if (m_currentTemplate.TagData.DataCheck == TemplateDataCheck.Valid)
            {
                m_tagsHelper.ConfigureFromTemplateData(m_currentTemplate.TagData);
            }
        }
예제 #2
0
        public void FetchDataFromTemplate(TemplateModulesData module)
        {
            m_allModulesMode = module.AllModulesMode;

            if (module.PragmaTag.IsValid)
            {
                m_hasValidData = true;
                //m_additionalPragmas.IsValid = true;
                //m_additionalPragmas.FillNativeItems( module.IncludePragmaContainer.PragmasList );

                //m_additionalIncludes.IsValid = true;
                //m_additionalIncludes.FillNativeItems( module.IncludePragmaContainer.IncludesList );

                //m_additionalDefines.IsValid = true;
                //m_additionalDefines.FillNativeItems( module.IncludePragmaContainer.DefinesList );

                m_additionalDirectives.FillNativeItems(module.IncludePragmaContainer.NativeDirectivesList);
                m_additionalDirectives.IsValid = true;
            }
            else
            {
                //m_additionalPragmas.IsValid = false;
                //m_additionalIncludes.IsValid = false;
                //m_additionalDefines.IsValid = false;
                m_additionalDirectives.IsValid = false;
            }

            m_blendOpHelper.ConfigureFromTemplateData(module.BlendData);
            if (module.BlendData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_blendOpHelper1.ConfigureFromTemplateData(module.BlendData1);
            if (module.BlendData1.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_blendOpHelper2.ConfigureFromTemplateData(module.BlendData2);
            if (module.BlendData2.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_blendOpHelper3.ConfigureFromTemplateData(module.BlendData3);
            if (module.BlendData3.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_alphaToMaskHelper.ConfigureFromTemplateData(module.AlphaToMaskData);
            if (module.AlphaToMaskData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_cullModeHelper.ConfigureFromTemplateData(module.CullModeData);
            if (module.CullModeData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_colorMaskHelper.ConfigureFromTemplateData(module.ColorMaskData);
            if (module.ColorMaskData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_colorMaskHelper1.ConfigureFromTemplateData(module.ColorMaskData1);
            if (module.ColorMaskData1.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_colorMaskHelper2.ConfigureFromTemplateData(module.ColorMaskData2);
            if (module.ColorMaskData2.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_colorMaskHelper3.ConfigureFromTemplateData(module.ColorMaskData3);
            if (module.ColorMaskData3.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_stencilBufferHelper.ConfigureFromTemplateData(module.StencilData);
            if (module.StencilData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_depthOphelper.ConfigureFromTemplateData(module.DepthData);
            if (module.DepthData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_tagsHelper.ConfigureFromTemplateData(module.TagData);
            if (module.TagData.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }

            m_shaderModelHelper.ConfigureFromTemplateData(module.ShaderModel);
            if (module.ShaderModel.DataCheck == TemplateDataCheck.Valid)
            {
                m_hasValidData = true;
            }


            if (module.RenderPlatformHelper.IsValid)
            {
                m_renderingPlatforms.SetupFromTemplate(module.RenderPlatformHelper);
                m_hasValidData = true;
            }
        }