DrawStart() static private method

static private DrawStart ( Program program ) : void
program Program
return void
Esempio n. 1
0
		public void Draw(Primitive primitive, int vertexCount, GraphicsBuffer elementBuffer, ElementType elementType, int elementOffsetInBytes) {
			if (elementBuffer == null)
				throw new ArgumentNullException("elementBuffer");
			Device.DrawStart(this);
			using (Device.Lock()) {
				GL.BindBuffer(BufferTarget.ElementArrayBuffer, elementBuffer.Id);
				CheckError();
				GL.DrawElements((BeginMode)primitive, vertexCount, (DrawElementsType)elementType, elementOffsetInBytes);
				CheckError();
				GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
			}
		}
Esempio n. 2
0
		public void Draw(Primitive primitive, int firstVertex, int vertexCount) {
			Device.DrawStart(this);
			using (Device.Lock())
				GL.DrawArrays((PrimitiveType)primitive, firstVertex, vertexCount);
		}