spaceconquest.HexModel.Draw C# (CSharp) Method

Draw() public static method

public static Draw ( Effect effect ) : void
effect Microsoft.Xna.Framework.Graphics.Effect
return void
        public static void Draw(Effect effect)
        {
            GraphicsDevice graphicsDevice = effect.GraphicsDevice;

            // Set our vertex declaration, vertex buffer, and index buffer.
            graphicsDevice.SetVertexBuffer(vertexBuffer);

            graphicsDevice.Indices = indexBuffer;

            foreach (EffectPass effectPass in effect.CurrentTechnique.Passes)
            {
                effectPass.Apply();

                int primitiveCount = indices.Count / 3;

                graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, vertices.Count, 0, primitiveCount);

            }
        }

Same methods

HexModel::Draw ( Matrix world, Matrix view, Matrix projection, Color newcolor ) : void