/// <summary>
			/// 
			/// </summary>
			/// <param name="arrayBuffer"></param>
			/// <param name="sectionIndex"></param>
			public ArrayAttachment(ArrayBufferObjectBase arrayBuffer, uint sectionIndex)
			{
				if (arrayBuffer == null)
					throw new ArgumentNullException("arrayBuffer");

				ArrayBuffer = arrayBuffer;
				ArrayBuffer.IncRef();
				ArraySectionIndex = sectionIndex;
			}
Exemplo n.º 2
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="arrayBuffer"></param>
            /// <param name="sectionIndex"></param>
            public ArrayAttachment(ArrayBufferObjectBase arrayBuffer, uint sectionIndex)
            {
                if (arrayBuffer == null)
                {
                    throw new ArgumentNullException("arrayBuffer");
                }

                ArrayBuffer = arrayBuffer;
                ArrayBuffer.IncRef();
                ArraySectionIndex = sectionIndex;
            }
			/// <summary>
			/// Construct an VertexArray for enabling vertex attribute.
			/// </summary>
			/// <param name="arrayBuffer">
			/// A <see cref="ArrayBufferObjectBase"/> which defines a vertex array buffer.
			/// </param>
			/// <param name="sectionIndex">
			/// A <see cref="UInt32"/> that specify the section of <paramref name="arrayBuffer"/>.
			/// </param>
			public VertexArray(ArrayBufferObjectBase arrayBuffer, uint sectionIndex)
			{
				if (arrayBuffer != null && arrayBuffer.ItemCount == 0)
					throw new ArgumentException("zero items", "arrayBuffer");
				if (arrayBuffer != null && sectionIndex >= arrayBuffer.ArraySectionsCount)
					throw new ArgumentOutOfRangeException("out of bounds", "sectionIndex");

				ArrayBuffer = arrayBuffer;
				if (ArrayBuffer != null)
					ArrayBuffer.IncRef();
				ArraySectionIndex = sectionIndex;
			}
Exemplo n.º 4
0
            /// <summary>
            /// Construct an VertexArray for enabling vertex attribute.
            /// </summary>
            /// <param name="arrayBuffer">
            /// A <see cref="ArrayBufferObjectBase"/> which defines a vertex array buffer.
            /// </param>
            /// <param name="sectionIndex">
            /// A <see cref="UInt32"/> that specify the section of <paramref name="arrayBuffer"/>.
            /// </param>
            public VertexArray(ArrayBufferObjectBase arrayBuffer, uint sectionIndex)
            {
                if (arrayBuffer != null && arrayBuffer.ItemCount == 0)
                {
                    throw new ArgumentException("zero items", "arrayBuffer");
                }
                if (arrayBuffer != null && sectionIndex >= arrayBuffer.ArraySectionsCount)
                {
                    throw new ArgumentOutOfRangeException("out of bounds", "sectionIndex");
                }

                ArrayBuffer = arrayBuffer;
                if (ArrayBuffer != null)
                {
                    ArrayBuffer.IncRef();
                }
                ArraySectionIndex = sectionIndex;
            }