コード例 #1
0
        void Process()
        {
            GLTextuer2D i1 = (GLTextuer2D)input.Input.Data;

            if (i1 == null)
            {
                return;
            }
            if (i1.Id == 0)
            {
                return;
            }

            CreateBufferIfNeeded();

            processor.TileX = tileX;
            processor.TileY = tileY;
            processor.Min   = new OpenTK.Vector3(range.min[0], range.min[1], range.min[2]);
            processor.Max   = new OpenTK.Vector3(range.max[0], range.max[1], range.max[2]);
            processor.Mid   = new OpenTK.Vector3(range.mid[0], range.mid[1], range.mid[2]);

            processor.Process(width, height, i1, buffer);
            processor.Complete();

            Updated();
            Output.Data = buffer;
            Output.Changed();
        }
コード例 #2
0
ファイル: LevelsNode.cs プロジェクト: xuyanning/Materia
        void Process()
        {
            if (!input.HasInput)
            {
                return;
            }

            GLTextuer2D i1 = (GLTextuer2D)input.Reference.Data;

            if (i1 == null)
            {
                return;
            }
            if (i1.Id == 0)
            {
                return;
            }

            CreateBufferIfNeeded();

            processor.TileX = tileX;
            processor.TileY = tileY;
            processor.Min   = new Math3D.Vector3(prange.min[0], prange.min[1], prange.min[2]);
            processor.Max   = new Math3D.Vector3(prange.max[0], prange.max[1], prange.max[2]);
            processor.Mid   = new Math3D.Vector3(prange.mid[0], prange.mid[1], prange.mid[2]);
            processor.Value = new Math3D.Vector2(prange.min[3], prange.max[3]);

            processor.Process(width, height, i1, buffer);
            processor.Complete();

            Output.Data = buffer;
            TriggerTextureChange();
        }