I am new to DirectX, How can I create a DirectX application (using DirectX9)?

DirectX9 contains the "DirectX9 C++ Wizard" that helps even non-programmers to create a sample DirectX application that can support Direct3D, DirectInput & DirectPlay with just a few mouse clicks.

Select New->Project in the Visual C++ Compiler. Select "DirectX9 C++ Wizard"from the list of Wizards. A new window showing the capabilities you want for your App will Pop-Up. Select the capability you desire and that's it! The Wizard will create the code for your sample Application. Compile the code, link it and see its working.

If you really want to get your feet wet by creating a small DirectX App from scratch here is a simple tutorial in which we will just create a Direct3D device for drawing and use the device to clear our window with a color.

First of all you have to create the d3D9 object, set its presentation parameter structure and then create the rendering device from the d3d9 object.

The sample program shown below First creates a window then Initializes d3d and starts drawing the scene. After we exit from the message-pump, the d3dobjects are cleaned-up to avoid memory-leaks.

Read the attached "DirectXApp.zip" to see the full source code.

FAQ Menu

 
Printer friendly version of the FAQ-DIRECTX-Create-DirectX-Application page


Sponsored links

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Six Sigma Certification
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
SSH and SFTP support for .NET
Add complete SSH and SFTP support to your .NET framework application
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!

Advertisement



Free Magazine

Free Magazines
eWeek The essential technology information source for builders of e-business.... subscribe now

Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.