protected override void OnFree(bool isManual) { base.OnFree(isManual); if (m_ColorBuffer != null) { m_ColorBuffer.Dispose(); m_ColorBuffer = null; } }
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); }