Esempio n. 1
0
        public NativeDirectFloatBuffer(DirectByteBuffer buffer)
            : base(buffer.remaining() >> 2)
        {
            this.m_buffer = buffer;
            this.m_data   = new float[(buffer.m_data.Length - (buffer.position() >> 2)) / 4];
            int index1 = buffer.position() >> 2;

            for (int index2 = 0; index2 < this.m_data.Length; ++index2)
            {
                byte[] numArray = new byte[4];
                for (int index3 = 0; index3 < numArray.Length; ++index3)
                {
                    numArray[index3] = (byte)buffer.m_data[index1];
                    ++index1;
                }
                this.m_data[index2] = BitConverter.ToSingle(numArray, 0);
            }
            this.m_lockCount = 0;
        }
Esempio n. 2
0
 public new void Dispose()
 {
     this.m_buffer = (DirectByteBuffer)null;
     base.Dispose();
 }