Пример #1
0
        internal void bufferData(uint p, __ArrayBufferView v, uint p_2)
        {
            #region f32
            var f32 = v as __Float32Array;
            if (f32 != null)
            {
                if (CurrentBuffer.value == 0)
                {
                    CurrentBuffer.value = f32.InternalFloatArray.Length * 4;

                    bindBuffer(p, CurrentBuffer);
                }

                opengl.glBufferData((int)p, CurrentBuffer.value, f32.InternalFloatBuffer, (int)p_2);
            }
            #endregion

            #region u16
            var u16 = v as __Uint16Array;
            if (u16 != null)
            {
                if (CurrentBuffer.value == 0)
                {
                    CurrentBuffer.value = u16.InternalFloatArray.Length * 2;

                    bindBuffer(p, CurrentBuffer);
                }

                opengl.glBufferData((int)p, CurrentBuffer.value, u16.InternalBuffer, (int)p_2);
            }
            #endregion
        }
        internal void bufferData(uint p, __ArrayBufferView v, uint p_2)
        {
            #region f32
            var f32 = v as __Float32Array;
            if (f32 != null)
            {
                if (CurrentBuffer.value == 0)
                {
                    CurrentBuffer.value = f32.InternalFloatArray.Length * 4;

                    bindBuffer(p, CurrentBuffer);
                }

                opengl.glBufferData((int)p, CurrentBuffer.value, f32.InternalFloatBuffer, (int)p_2);
            }
            #endregion

            #region u16
            var u16 = v as __Uint16Array;
            if (u16 != null)
            {
                if (CurrentBuffer.value == 0)
                {
                    CurrentBuffer.value = u16.InternalFloatArray.Length * 2;

                    bindBuffer(p, CurrentBuffer);
                }

                opengl.glBufferData((int)p, CurrentBuffer.value, u16.InternalBuffer, (int)p_2);
            }
            #endregion
        }