Пример #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);
 }