DirectX Programming Using DirectX 9, Almost as Easy as MessageBox("Hello world");


This animation took about five lines of source code.

Environment: VC6 Win 9x/ME/2000/XP (DirectX 9 needed); NT will not be supported

DirectX from Microsoft is a mighty and powerful interface, providing the programmer with a lot of functions to do anything you can think of. But the price is that using DirectX (in this case, the 9th generation) is a kind of an enigma to most programmers who might need it for home use.

That's the point where I come in!

I got fed up of writing the same routines every time I needed them. So, I decided to encapsulate the most common functions into a small class. This was when I first started with programming DirectX 7.

This class grew and grew over time and now we've reached DirectX 9. The class reached a state where it could be a powerful tool for almost everybody out there who knows how to program a simple dialog. Much more knowledge is not needed to use DirectX 9 with my class. It would be a good addon to download some more DX tools from my Web site, but the class that can be downloaded here supplies you with the following items:

  • DirectDraw
  • Direct3D (Prelit and dynamic lights, fog, Effects, Alphatransparence, Stencilbuffer, Zbuffer, etc...) in addition to some more of my helper classes, even Bumpmapping and Environmentmapping
  • DirectSound
  • DirectInput (Also ForceFeedback)
  • DirectPlay
  • DirectVoice

Simply create an object of my class and call SetParent(...); the whole world of DirectX will be available to you without endless hours of not understanding how the interfaces work. If you don't believe, take a look at the downloads available at www.pcs-soft.de and see what I've done with this class in a couple of hours or days.

I wish you a good time and much success by doing whatever you feel like.

Shots from T. Bock.

Downloads

Download source - 47 Kb


Comments

  • What is this thing anyway??

    Posted by HSmith on 04/26/2005 03:14pm

    There is nothing 'easy' contained herein. I spent hours messing with this project source code. It was apparently written using the 8.1 SDK Appwizard as it is relying on files only it generates. I attempted to get this going reverting back to SDK 8.1, then attempted with 9. What a nightmare. Complete waste of time. Also, it attempting to compile this code, I realized the MS has hardcoded the version #s in the data structures! What kind of monkey business is that? Spare me. If that is what Directx is all about, I can tell you where it is being sent, directly.

    Reply
  • GameX

    Posted by Legacy on 02/14/2004 12:00am

    Originally posted by: R.C. Hoetzlein

    Very nice project. We've been working on a similar open-source project to simplify game development for several years now. Much of our motivation recently has been getting game development into a CS curriculum. Check it out: http://www.lightlink.com/lhmatrix/gamex or http://www.cs.cornell.edu/projects/game/gamex (mirror site)

    Reply
  • it's very good

    Posted by Legacy on 05/28/2003 12:00am

    Originally posted by: niceguy

    demo project please....

    Reply
  • I have made an API, so you write this in 1 line!!!!

    Posted by Legacy on 05/07/2003 12:00am

    Originally posted by: Bill Gates

    it seems you are selling software

    Reply
  • Unfortunate

    Posted by Legacy on 05/07/2003 12:00am

    Originally posted by: okigan

    Unfortunate but this is a total waste of time.

    I was looking for information how to get DX working
    in "5 lines of code, and this is not it

    Reply
  • lame

    Posted by Legacy on 05/06/2003 12:00am

    Originally posted by: matt

    what a shameless, cheap, juvenile self promotion of XXX-soft.
    memo to editors: we should have a filter for this kind of cheese.

    Reply
  • Is this good?

    Posted by Legacy on 05/06/2003 12:00am

    Originally posted by: Jason

    How is this better than the common class included with the DirectX demos? Also, this is totally unstructured.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: October 29, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT It's well understood how critical version control is for code. However, its importance to DevOps isn't always recognized. The 2014 DevOps Survey of Practice shows that one of the key predictors of DevOps success is putting all production environment artifacts into version control. In this eSeminar, Gene Kim will discuss these survey findings and will share woeful tales of artifact management gone wrong! Gene will also share examples of how …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds