Font.DrawText (C#)

From: VidalSasoon (vidalsasoon_at_bootbox.net)
Date: 05/15/04

  • Next message: Rich [Microsoft Direct3D MVP]: "Re: Font.DrawText (C#)"
    Date: 15 May 2004 09:36:41 -0700
    
    

    OK, I have a small 3d app working and I got some text to display on
    screen. The problem is when I display the text and move around my 3d
    environment the text being displayed gets hidden by the objects on
    screen. What I want is for the text to be in front of everything. I
    probably just missed a setting but I'm not sure what to do.

    thanks

            public class DebugInfo
            {
                    Direct3D.Device d3dDevice;
                    Direct3D.Font fontDebug;
                    

                    public DebugInfo(Direct3D.Device dev)
                    {
                            d3dDevice = dev;

                            fontDebug = new Direct3D.Font(d3dDevice, new
    System.Drawing.Font("Arial", 12.0f, FontStyle.Bold));

                    }

                    public void ShowDebugInfo(int fps)
                    {
                            fontDebug.DrawText(fps.ToString(), new Rectangle(5,5,0,0),
    Direct3D.DrawTextFormat.NoClip, Color.Yellow);

                    }

            }


  • Next message: Rich [Microsoft Direct3D MVP]: "Re: Font.DrawText (C#)"