Пример #1
0
        public ArrayBufferView <sbyte> GetSByteBufferView(long byteOffset, long byteLength)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <sbyte> bufferView = new ArrayBufferView <sbyte>(buffer.SByteBuffer, byteOffset, byteLength);

            AddDisposable(bufferView);
            return(bufferView);
        }
Пример #2
0
        public ArrayBufferView <ulong> GetUInt64BufferView(long byteOffset, long byteLength, bool tearFree)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <ulong> bufferView = tearFree ? new SharedUInt64BufferView(buffer.UInt64Buffer, buffer.Int64Buffer, byteOffset / sizeof(long), byteLength / sizeof(long)) : new ArrayBufferView <ulong>(buffer.UInt64Buffer, byteOffset / sizeof(ulong), byteLength / sizeof(ulong));

            AddDisposable(bufferView);
            return(bufferView);
        }
Пример #3
0
        public ArrayBufferView <uint> GetUInt32BufferView(long byteOffset, long byteLength)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <uint> bufferView = new ArrayBufferView <uint>(buffer.UInt32Buffer, byteOffset / sizeof(uint), byteLength / sizeof(uint));

            AddDisposable(bufferView);
            return(bufferView);
        }
Пример #4
0
        public ArrayBufferView <short> GetInt16BufferView(long byteOffset, long byteLength)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <short> bufferView = new ArrayBufferView <short>(buffer.Int16Buffer, byteOffset / sizeof(short), byteLength / sizeof(short));

            AddDisposable(bufferView);
            return(bufferView);
        }
Пример #5
0
        public ArrayBufferView <double> GetDoubleBufferView(long byteOffset, long byteLength)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <double> bufferView = new ArrayBufferView <double>(buffer.DoubleBuffer, byteOffset / sizeof(double), byteLength / sizeof(double));

            AddDisposable(bufferView);
            return(bufferView);
        }
Пример #6
0
        public ArrayBufferView <float> GetFloatBufferView(long byteOffset, long byteLength)
        {
            ThrowIfBufferDetached();
            ArrayBufferView <float> bufferView = new ArrayBufferView <float>(buffer.FloatBuffer, byteOffset / sizeof(float), byteLength / sizeof(float));

            AddDisposable(bufferView);
            return(bufferView);
        }