예제 #1
0
        public void RenderDebugLines(GameTime gameTime, ref IndexedMatrix view, ref IndexedMatrix projection)
        {
            m_debugEffect.World = Matrix.Identity;
            m_debugEffect.View = view.ToMatrix();
            m_debugEffect.Projection = projection.ToMatrixProjection();

            if (m_lineIndex > 0)
            {
                foreach (EffectPass pass in m_debugEffect.CurrentTechnique.Passes)
                {
                    pass.Apply();
                    m_game.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.LineList, m_lineVertices, 0, m_lineIndex / 2);
                }
            }
            m_lineIndex = 0;
        }
예제 #2
0
        private void DrawPrimitives(GameTime gameTime, ref IndexedMatrix view, ref IndexedMatrix projection)
        {
            Matrix mView = view.ToMatrix();
            Matrix mProj = projection.ToMatrixProjection();
            DrawPrimitives(gameTime, mView, mProj);

        }