Ejemplo n.º 1
0
        /// <summary>
        /// Convert to ARGB byte buffer and init the readers.
        /// </summary>
        private void SetUpReaders()
        {
            // The int[] is copied using the fast Buffer.BlockCopy
            // Format INT1D_X8R8G8B8_32 is not used directly due to some detection issues. Maybe a NyARToolkit bug.

            // Init ARGB byte buffer
            var w = _size.w;
            var h = _size.h;

            byteBuffer = xrgbReader.GetAllPixelsAsByte();

            // Init readers
            pixelReader = new ArgbPixelReader(byteBuffer, w, h);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new ARGB buffer,
 /// </summary>
 /// <param name="width">The width of the buffer that will be used for detection.</param>
 /// <param name="height">The height of the buffer that will be used for detection.</param>
 public ArgbRaster(int width, int height)
     : base(width, height, BufferType)
 {
     this.pixelReader = new ArgbPixelReader(width, height);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new ARGB buffer,
 /// </summary>
 /// <param name="width">The width of the buffer that will be used for detection.</param>
 /// <param name="height">The height of the buffer that will be used for detection.</param>
 public ArgbRaster(int width, int height)
    : base(width, height, BufferType)
 {
    this.pixelReader = new ArgbPixelReader(width, height);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Convert to ARGB byte buffer and init the readers.
        /// </summary>
        private void SetUpReaders()
        {
            // The int[] is copied using the fast Buffer.BlockCopy
            // Format INT1D_X8R8G8B8_32 is not used directly due to some detection issues. Maybe a NyARToolkit bug.

            // Init ARGB byte buffer
            var w = _size.w;
            var h = _size.h;
            byteBuffer = xrgbReader.GetAllPixelsAsByte();

            // Init readers
            pixelReader = new ArgbPixelReader(byteBuffer, w, h);
        }