protected override IEnumerable <IParameter> CreateParameter(ConstantBufferDescription cbParent, Entity entity, int parameterIndex, string reference, InitializerParameters initializerParameters) { if (!ReferenceActions.ContainsKey(reference)) { throw new InvalidOperationException(string.Format("[{0}]: Effect parameter not valid", reference)); } return(ReferenceActions[reference](parameterIndex, entity, initializerParameters)); }
protected override IEnumerable <IParameter> CreateParameter(ConstantBufferDescription cbParent, Entity entity, int parameterIndex, string reference, InitializerParameters initializerParameters) { string cameraIdValue = cbParent.Get(Param.Properties.CameraId); int cameraId = Int32.Parse(cameraIdValue); if (!ReferenceActions.ContainsKey(reference)) { throw new InvalidOperationException(string.Format("[{0}]: Camera parameter not valid", reference)); } return(ReferenceActions[reference](parameterIndex, entity, initializerParameters)); }