Esempio n. 1
0
        protected override void OnFree(bool isManual)
        {
            base.OnFree(isManual);

            if (m_ColorBuffer != null)
            {
                m_ColorBuffer.Dispose();
                m_ColorBuffer = null;
            }
        }
Esempio n. 2
0
        public PixelBuffer(int width, int height) : base(width, height)
        {
            // 循环标注出索引
            PixelInfo info = new PixelInfo();

            for (int row = 0; row < height; ++row)
            {
                for (int col = 0; col < width; ++col)
                {
                    info.u = col;
                    info.v = row;
                    SetItem(col, row, info);
                }
            }

            m_ColorBuffer = new ColorBuffer(width, height);
        }