Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void DrawStuff()
- {
- VertexPositionColor[] primitiveList = { new VertexPositionColor(
- new Vector3(1,1,0), Color.Black), new VertexPositionColor(
- new Vector3(0,1,-1), Color.Black) };
- short[] lineListIndices = { 0, 1 };
- BasicEffect basicEffect = new BasicEffect(Controller.Graphics.GraphicsDevice);
- basicEffect.Alpha = 1.0f;
- basicEffect.LightingEnabled = false;
- basicEffect.World = Matrix.Identity;
- basicEffect.View = Controller.Cam.view;
- basicEffect.Projection = Controller.Cam.projection;
- foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
- {
- pass.Apply();
- Controller.CurrentGame.GraphicsDevice.DrawUserIndexedPrimitives<VertexPositionColor>(
- PrimitiveType.LineList,
- primitiveList,
- 0, // vertex buffer offset to add to each element of the index buffer
- 2, // number of vertices in pointList
- lineListIndices, // the index buffer
- 0, // first index element to read
- 1 // number of primitives to draw
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement