Esempio n. 1
0
        /// <summary>
        /// Draws this <see cref="GeometricPrimitive" />.
        /// </summary>
        /// <param name="graphicsDevice">The graphics device.</param>
        public void Draw(GraphicsDevice graphicsDevice)
        {
            // Setup the Vertex Buffer
            graphicsDevice.SetVertexArrayObject(vertexArrayObject);

            // Finally Draw this mesh
            graphicsDevice.DrawIndexed(PrimitiveType.TriangleList, IndexBuffer.ElementCount);
        }
Esempio n. 2
0
 /// <summary>
 /// Draws a quad. The effect must have been applied before calling this method with pixel shader having the signature float2:TEXCOORD.
 /// </summary>
 public void Draw()
 {
     GraphicsDevice.SetVertexArrayObject(sharedData.VertexBuffer);
     GraphicsDevice.Draw(PrimitiveType.TriangleList, QuadCount);
     GraphicsDevice.SetVertexArrayObject(null);
 }