Esempio n. 1
0
        void draw_lines(bool depth_test)
        {
            foreach (var go_set in Sets)
            {
                fGameObject go = go_set.Key;
                if (go.IsDestroyed)
                {
                    continue;
                }
                LineSet lines = go_set.Value;

                if (go.IsVisible() == false)
                {
                    continue;
                }
                if (lines.DepthTest != depth_test)
                {
                    continue;
                }

                GL.PushMatrix();
                try {
                    Transform transform = ((GameObject)go).transform;
                    GL.MultMatrix(transform.localToWorldMatrix);
                    Vector3f localCam = transform.InverseTransformPoint(CurrentCameraPos);
                    if (lines.WidthType == LineWidthType.Pixel)
                    {
                        if (lines.Width == 1)
                        {
                            draw_lines(lines, localCam);
                        }
                        else
                        {
                            draw_quads(lines, localCam);
                        }
                    }
                    else
                    {
                        draw_quads(lines, localCam);
                    }
                } catch {
                    throw;
                } finally {
                    GL.PopMatrix();
                }
            }
        }