示例#1
0
        void Process()
        {
            GLTextuer2D i1 = null;
            GLTextuer2D i2 = null;

            if (Inputs[0].HasInput)
            {
                i1 = (GLTextuer2D)Inputs[0].Input.Data;
            }

            if (Inputs[1].HasInput)
            {
                i2 = (GLTextuer2D)Inputs[1].Input.Data;
            }

            if (!function.BuildShader())
            {
                return;
            }

            CreateBufferIfNeeded();

            processor.Shader = function.Shader;
            processor.Process(width, height, i1, i2, buffer);
            processor.Complete();

            output.Data = buffer;
            output.Changed();
            Updated();
        }
示例#2
0
 private void BuildShader()
 {
     if (function != null)
     {
         shaderBuilt = function.BuildShader();
     }
     else
     {
         shaderBuilt = false;
     }
 }
示例#3
0
 private void BuildShader()
 {
     if (function != null)
     {
         shaderBuilt = function.BuildShader();
         if (shaderBuilt)
         {
             isRebuildRequired = false;
         }
     }
     else
     {
         shaderBuilt = false;
     }
 }