            return MathTools.Max3(tData.Vertex1.y, tData.Vertex2.y, tData.Vertex3.y);
        }

        private void DrawTriangle(TriangleData tData, DepthTexture modelTexture, DepthTexture screenTexture)
        {
            //set array boundes
            int left = 0;
            int right = 0;
            int top = 0;
            int bottom = 0;
            if (!OnScreen(tData, screenTexture, ref left, ref right, ref top, ref bottom))
                return; //cull out triangles not in screen space

            //setup values for the draw loop
