protected FLProgram Process(FlScriptExecutionContext context) { FLBuffer input = new FLBuffer( Instance, context.Input, context.Width, context.Height, context.Depth, context.Filename ); FLProgram program; if (context.IsCompiled) { Stream s = IOManager.GetStream(context.Filename); program = FLSerializer.LoadProgram(s, InstructionSet).Initialize(Instance, InstructionSet); s.Close(); } else { program = Parser.Process(new FLParserInput(context.Filename)).Initialize(Instance, InstructionSet); } program.Run(input, true); return(program); }
public virtual void Process() { while (ProcessQueue.Count != 0) { FlScriptExecutionContext fle = ProcessQueue.Dequeue(); FLProgram ret = Process(fle); fle.OnFinishCallback?.Invoke(ret); } }
private object _proc() { while (ProcessQueue.Count != 0) { FlScriptExecutionContext fle = ProcessQueue.Dequeue(); FLProgram texUpdate = Process(fle); fle.OnFinishCallback?.Invoke(texUpdate); } OnFinishQueue?.Invoke(); return(new object()); }
public virtual void Enqueue(FlScriptExecutionContext context) { ProcessQueue.Enqueue(context); }