예제 #1
0
        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);
        }
예제 #2
0
 public virtual void Process()
 {
     while (ProcessQueue.Count != 0)
     {
         FlScriptExecutionContext fle = ProcessQueue.Dequeue();
         FLProgram ret = Process(fle);
         fle.OnFinishCallback?.Invoke(ret);
     }
 }
예제 #3
0
        private object _proc()
        {
            while (ProcessQueue.Count != 0)
            {
                FlScriptExecutionContext fle = ProcessQueue.Dequeue();
                FLProgram texUpdate          = Process(fle);
                fle.OnFinishCallback?.Invoke(texUpdate);
            }

            OnFinishQueue?.Invoke();
            return(new object());
        }
예제 #4
0
 public virtual void Enqueue(FlScriptExecutionContext context)
 {
     ProcessQueue.Enqueue(context);
 }