Drawing Text
Again, drawing text is something that has already been done. However you just did the bare minimum before; we will delve a little deeper into the methods now. In the previous examples, there has been a Font object both in the Microsoft.DirectX.Direct3D namespace, as well as the System.Drawing namespace. You must distinguish between them, so in order to help facilitate this, you should use the following using clause:
using Direct3D = Microsoft.DirectX.Direct3D;
This will allow us to the use the Direct3D alias instead of having to type the entire namespace out. With that, let's go ahead and create a new project for our text drawing example. Make sure you add the references and the using clauses to the project (including the previous ...
Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.