예제 #1
0
		public override void WriteInstance( Serialization.MaterialSerializer ser, SubRenderState subRenderState,
		                                    Graphics.Pass srcPass, Graphics.Pass dstPass )
		{
			//TODO
			//ser.WriteAttribute(4, "transform_stage");
			//ser.WriteValue("ffp");
		}
		public override void WriteInstance( Serialization.MaterialSerializer ser, SubRenderState subRenderState,
		                                    Graphics.Pass srcPass, Graphics.Pass dstPass )
		{
			//TODO
			//ser.WriteAttribute(4, "lighting_stage");
			//ser.WriteValue("per_pixel");
		}
예제 #3
0
 public override void WriteInstance(Serialization.MaterialSerializer ser, SubRenderState subRenderState,
                                    Graphics.Pass srcPass, Graphics.Pass dstPass)
 {
     //TODO
     //ser.WriteAttribute(4, "transform_stage");
     //ser.WriteValue("ffp");
 }
예제 #4
0
 public override void WriteInstance(Serialization.MaterialSerializer ser, SubRenderState subRenderState,
                                    Graphics.Pass srcPass, Graphics.Pass dstPass)
 {
     //TODO
     //ser.WriteAttribute(4, "lighting_stage");
     //ser.WriteValue("per_pixel");
 }
예제 #5
0
        public override SubRenderState CreateInstance(Scripting.Compiler.ScriptCompiler compiler,
                                                      Scripting.Compiler.AST.PropertyAbstractNode prop, Graphics.Pass pass,
                                                      SGScriptTranslator stranslator)
        {
            SubRenderState subRenderState = CreateInstance();

            return(subRenderState);
        }
 public override void writeInstance(MaterialSerializer ser, SubRenderState subRenderState, TextureUnitState srcTextureUnit, TextureUnitState dstTextureUnit)
 {
     RTShaderPINVOKE.LayeredBlendingFactory_writeInstance(swigCPtr, MaterialSerializer.getCPtr(ser), SubRenderState.getCPtr(subRenderState), TextureUnitState.getCPtr(srcTextureUnit), TextureUnitState.getCPtr(dstTextureUnit));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public virtual void destroyInstance(SubRenderState subRenderState)
 {
     RTShaderPINVOKE.SubRenderStateFactory_destroyInstance(swigCPtr, SubRenderState.getCPtr(subRenderState));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #8
0
 public void destroySubRenderState(SubRenderState subRenderState)
 {
     RTShaderPINVOKE.ShaderGenerator_destroySubRenderState(swigCPtr, SubRenderState.getCPtr(subRenderState));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #9
0
 public void addSubRenderStateInstance(SubRenderState subRenderState)
 {
     RTShaderPINVOKE.TargetRenderState_addSubRenderStateInstance(swigCPtr, SubRenderState.getCPtr(subRenderState));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #10
0
 public void removeTemplateSubRenderState(SubRenderState subRenderState)
 {
     RTShaderPINVOKE.RenderState_removeTemplateSubRenderState(swigCPtr, SubRenderState.getCPtr(subRenderState));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #11
0
 public override void copyFrom(SubRenderState rhs)
 {
     RTShaderPINVOKE.NormalMapLighting_copyFrom(swigCPtr, SubRenderState.getCPtr(rhs));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public void removeSubRenderStateInstance(SubRenderState subRenderState)
 {
     RTShaderPINVOKE.SubRenderStateAccessor_removeSubRenderStateInstance(swigCPtr, SubRenderState.getCPtr(subRenderState));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #13
0
 public virtual void copyFrom(SubRenderState rhs)
 {
     RTShaderPINVOKE.SubRenderState_copyFrom(swigCPtr, SubRenderState.getCPtr(rhs));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #14
0
 public override void writeInstance(MaterialSerializer ser, SubRenderState subRenderState, Pass srcPass, Pass dstPass)
 {
     RTShaderPINVOKE.FFPTransformFactory_writeInstance(swigCPtr, MaterialSerializer.getCPtr(ser), SubRenderState.getCPtr(subRenderState), Pass.getCPtr(srcPass), Pass.getCPtr(dstPass));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #15
0
 public override void copyFrom(SubRenderState rhs)
 {
     RTShaderPINVOKE.IntegratedPSSM3_copyFrom(swigCPtr, SubRenderState.getCPtr(rhs));
     if (RTShaderPINVOKE.SWIGPendingException.Pending)
     {
         throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #16
0
        public SubRenderState createInstance(ScriptCompiler compiler, PropertyAbstractNode prop, Pass pass, SGScriptTranslator translator)
        {
            global::System.IntPtr cPtr = RTShaderPINVOKE.IntegratedPSSM3Factory_createInstance(swigCPtr, ScriptCompiler.getCPtr(compiler), PropertyAbstractNode.getCPtr(prop), Pass.getCPtr(pass), SGScriptTranslator.getCPtr(translator));
            SubRenderState        ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SubRenderState(cPtr, false);

            if (RTShaderPINVOKE.SWIGPendingException.Pending)
            {
                throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #17
0
        public SubRenderState createSubRenderState(string type)
        {
            global::System.IntPtr cPtr = RTShaderPINVOKE.ShaderGenerator_createSubRenderState(swigCPtr, type);
            SubRenderState        ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SubRenderState(cPtr, false);

            if (RTShaderPINVOKE.SWIGPendingException.Pending)
            {
                throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public SubRenderState createInstance()
        {
            global::System.IntPtr cPtr = RTShaderPINVOKE.SubRenderStateFactory_createInstance__SWIG_0(swigCPtr);
            SubRenderState        ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SubRenderState(cPtr, false);

            if (RTShaderPINVOKE.SWIGPendingException.Pending)
            {
                throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #19
0
        public virtual SubRenderState getGeneratedSubRenderState(string typeName)
        {
            global::System.IntPtr cPtr = RTShaderPINVOKE.SGScriptTranslator_getGeneratedSubRenderState(swigCPtr, typeName);
            SubRenderState        ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SubRenderState(cPtr, false);

            if (RTShaderPINVOKE.SWIGPendingException.Pending)
            {
                throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public virtual SubRenderState createOrRetrieveInstance(SGScriptTranslator translator)
        {
            global::System.IntPtr cPtr = RTShaderPINVOKE.SubRenderStateFactory_createOrRetrieveInstance(swigCPtr, SGScriptTranslator.getCPtr(translator));
            SubRenderState        ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SubRenderState(cPtr, false);

            if (RTShaderPINVOKE.SWIGPendingException.Pending)
            {
                throw RTShaderPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #21
0
        private LayeredBlending CreateOrRetrieveSubRenderState(ScriptTranslator translator)
        {
            LayeredBlending layeredBlendState = null;
            //check if we already create a blend srs
            SubRenderState subState = translator.GetGeneratedSubRenderState(Type);

            if (subState != null)
            {
                layeredBlendState = subState as LayeredBlending;
            }
            else
            {
                SubRenderState subRenderState = CreateOrRetrieveInstance(translator);
                layeredBlendState = (LayeredBlending)subRenderState;
            }

            return(layeredBlendState);
        }
예제 #22
0
        public override void WriteInstance(Serialization.MaterialSerializer ser, SubRenderState subRenderState, Pass srcPass,
                                           Pass dstPass)
        {
            //TODO
            //ser.WriteAttribute(4, "rtss_ext_reflection_map");

            //ReflectionMap reflectionMapSubRenderState = subRenderState as ReflectionMap;
            //if (reflectionMapSubRenderState.ReflectionMapType == TextureType.CubeMap)
            //{
            //    ser.WriteValue("cube_map");
            //}
            //else if (reflectionMapSubRenderState.ReflectionMapType == TextureType.TwoD)
            //{
            //    ser.WriteValue("2d_map");
            //}

            //ser.WriteValue(reflectionMapSubRenderState.MaskMapTextureName);
            //ser.WriteValue(reflectionMapSubRenderState.ReflectionMapTextureName);
            //ser.WriteValue(reflectionMapSubRenderState.ReflectionPower.ToString());
        }
예제 #23
0
        public override void WriteInstance(Serialization.MaterialSerializer ser, SubRenderState subRenderState,
                                           Graphics.TextureUnitState srcTextureUnit,
                                           Graphics.TextureUnitState dstTextureUnit)
        {
            int texIndex = 0;

            for (int i = 0; i < srcTextureUnit.Parent.TextureUnitStatesCount; i++)
            {
                if (srcTextureUnit.Parent.GetTextureUnitState(i) == srcTextureUnit)
                {
                    texIndex = i;
                    break;
                }
            }

            //get blend mode for current texture unit
            var layeredBlendingSubRenderState = subRenderState as LayeredBlending;

            //write the blend mode
            LayeredBlending.BlendMode blendMode = layeredBlendingSubRenderState.GetBlendMode(texIndex);
            if (blendMode != LayeredBlending.BlendMode.Invalid)
            {
                //TODO
                //ser.WriteAttribute(5, "layered_blend");
                //ser.WriteAttribute(BlendModeToString(blendMode));
            }

            //write the source modifier
            LayeredBlending.SourceModifier modType;
            int customNum;

            if (layeredBlendingSubRenderState.GetSourceModifier(texIndex, out modType, out customNum) == true)
            {
                //TODO
                //ser.WriteAttribute(5, "source_modifier");
                //ser.WriteValue(SourceModifierToString(modType));
                //ser.WriteValue("custom");
                //ser.WriteValue(customNum.ToString());
            }
        }
예제 #24
0
		public override void WriteInstance( Serialization.MaterialSerializer ser, SubRenderState subRenderState,
		                                    Graphics.TextureUnitState srcTextureUnit,
		                                    Graphics.TextureUnitState dstTextureUnit )
		{
			int texIndex = 0;
			for ( int i = 0; i < srcTextureUnit.Parent.TextureUnitStatesCount; i++ )
			{
				if ( srcTextureUnit.Parent.GetTextureUnitState( i ) == srcTextureUnit )
				{
					texIndex = i;
					break;
				}
			}

			//get blend mode for current texture unit
			var layeredBlendingSubRenderState = subRenderState as LayeredBlending;

			//write the blend mode
			LayeredBlending.BlendMode blendMode = layeredBlendingSubRenderState.GetBlendMode( texIndex );
			if ( blendMode != LayeredBlending.BlendMode.Invalid )
			{
				//TODO
				//ser.WriteAttribute(5, "layered_blend");
				//ser.WriteAttribute(BlendModeToString(blendMode));
			}

			//write the source modifier
			LayeredBlending.SourceModifier modType;
			int customNum;
			if ( layeredBlendingSubRenderState.GetSourceModifier( texIndex, out modType, out customNum ) == true )
			{
				//TODO
				//ser.WriteAttribute(5, "source_modifier");
				//ser.WriteValue(SourceModifierToString(modType));
				//ser.WriteValue("custom");
				//ser.WriteValue(customNum.ToString());
			}
		}
예제 #25
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SubRenderState obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
예제 #26
0
        public override SubRenderState CreateInstance(Scripting.Compiler.ScriptCompiler compiler,
                                                      Scripting.Compiler.AST.PropertyAbstractNode prop, Pass pass,
                                                      SGScriptTranslator stranslator)
        {
            if (prop.Name == "rtss_ext_reflection_map")
            {
                if (prop.Values.Count >= 2)
                {
                    string strValue;
                    int    it = 0;

                    //Read reflection map type
                    if (!SGScriptTranslator.GetString(prop.Values[it], out strValue))
                    {
                        //compiler.AddError(...)
                        return(null);
                    }
                    it++;

                    SubRenderState subRenderState = CreateInstance();
                    var            reflectionMapSubRenderState = subRenderState as ReflectionMap;

                    //Reflection map is cubic texture.
                    if (strValue == "cube_map")
                    {
                        reflectionMapSubRenderState.ReflectionMapType = TextureType.CubeMap;
                    }
                    else if (strValue == "2d_map")
                    {
                        reflectionMapSubRenderState.ReflectionMapType = TextureType.TwoD;
                    }

                    if (!SGScriptTranslator.GetString(prop.Values[it], out strValue))
                    {
                        //compiler.AddError(...)
                        return(null);
                    }
                    reflectionMapSubRenderState.MaskMapTextureName = strValue;
                    it++;

                    //read reflection texture
                    if (!SGScriptTranslator.GetString(prop.Values[it], out strValue))
                    {
                        //compiler.AddError(...);
                        return(null);
                    }
                    reflectionMapSubRenderState.ReflectionMapTextureName = strValue;
                    it++;

                    //Read reflection power value
                    Real reflectionPower = 0.5;
                    if (!SGScriptTranslator.GetReal(prop.Values[it], out reflectionPower))
                    {
                        //compiler.AddError(...)
                        return(null);
                    }
                    reflectionMapSubRenderState.ReflectionPower = reflectionPower;

                    return(subRenderState);
                }
            }

            return(null);
        }
예제 #27
0
 public override void WriteInstance(Serialization.MaterialSerializer ser, SubRenderState subRenderState,
                                    Graphics.Pass srcPass, Graphics.Pass dstPass)
 {
 }