zophusX
zophusX

A Beginner's Source for all things DirectX

DirectX Tutorials for Beginners

About This Site

Welcome to ZophusX. I created this page to help ANYONE learn DirectX. This page has many very thorough tutorials geared towards beginners. Tutorials are written in C++, and object oriented, but still written to be easy to understand, even to people familiar with just C# or Java.

Simply use the menus above and jump right into the tutorials! And don't worry if you don't even have a clue where to start: the very first tutorial will tell you how to both get a full-featured compiler AND set it up. And don't worry if you know little of Direct3D or even Windows programming: everything is taught at a comfortable pace. You need only a light programming background and you'll be just fine.

Note that all tutorials flow from one to the next. We constantly build off code built in previous tutorials, and never cover old material. Hence, I highly recommend you never skip a tutorial or you won't know what's going on. I've found Direct3D & DirectX far easier to learn when you extend off existing topics & knowledge. But we do start from scratch (no base code).

I hope you enjoy it.

- Ber'Zophus

Latest News - November 24, 2009 - Tutorial #14 AND #15 are up!

The tutorial everyone has been waiting for, The Spinning Cube, has been added. Oh, and so is tutorial #15, that extends on the spinning cube to make it even cooler (oh, yeah and you'll probably learn something about world transformations, but feh on learning.)

Three tutorials in two days. I promise you. I will never be able to keep up this pace.

- Ber'Zophus

November 23, 2009 - Tutorial #13 is up!

I think that would be a record. Tutorial #13 is up in just 1 day, which teaches all about textures. Of course, I could blab on and on about it, or while I'm on a roll I could get to work on Tutorial 14. Yeah, let's do that.

- Ber'Zophus

November 22, 2009 - New website and Tutorial 12 are up!

Welcome to V6, you ZophusX fanatics! After a hiatus, I've returned to completely rewrite my website code and redesign everything. Do you like it? I didn't really like how the old one was laid out; I found it too complicated to browse. This new one is greatly simplified, putting the tutorials front-and-centre and getting rid of the excess. There's a lot less wasted space, too, now that I dropped that old frame on the left side. And I also prefer dark text on a light background, as opposed to the old way. This is much more comfortable to read. Not to mention in the background are great improvements to the site code.

This change was mostly brought about when I found out that Managed Direct3D turned out to be a pipedream on Microsoft's part. They dropped support of the thing damn near back when I first wrote this website. What that ultimately meant was my old C# tutorials were now useless. (those new to the site now know the old one also had C# tutorials. Not anymore, mes amis.)

It's kinda a blessing and a curse. Keeping the C# and C++ tutorials aligned was such a pain. I rewrote all the code so many times that I lost count. But worse than that, I was hiding some of C++'s more powerful functionality just because C# couldn't do it. Well, fret no more, C++ junkies! The C++ code and tutorials have been completely rewritten with C++ in mind. Since they're finally stand-alone, you'll notice the focus is fine-tuned much more than before. And, of course, for you java or C# junkies who just aren't quite familiar and comfortable with C++, you shouldn't fret either. The tutorials still move slow and explain concepts just as thoroughly as before. What that means is, you'll now be learning slightly more complicated C++ usage. There's no reason for you to, after all. Don't you want to be proficient in the industry's language choice?

So along with that rather major change, I've decided now is finally the time to switch off of VS.NET 2003 (wow) over to Visual Studio 2008. Just in time for 2010 to be in beta. Plus, Tutorial 0 is almost a complete rewrite. It now explains how to download and use Visual Studio. Perfect for those who don't have an IDE yet and want help setting it up (Though so you know, 2008 is far easier to setup than 2005. Easy enough that you probably don't need my help at all).

I updated the MSDN links, which actually were mostly ok, but some have been moved, yet again.

And Tutorial 12 is finally up. That's right, new tutorial! At long bloody last!

So...if you're from the old site, and you wonder just what happened to the C# tutorials....yeah, what can I say but blame microsoft. Or maybe what I should say is....just be patient. I have a plan for C#. Managed Direct3D might be dead, but Microsoft's got this new library just for C#. You may have heard of it....and yes, I plan to support it. (Because of how vastly, vastly different this unnamed library is, I will be putting in no effort at all to align the tutorials. So don't worry about the C++ tutorials changing for the 9th time. These new tutorials will be 100% new. Even if concepts are the same, I believe the tutorials should not becoming even 1% more complicated just to align to other tutorials. They'll be 100% separate.)

Oh, and I'm not ignoring C++ either. I understand there might just be a new DirectX version out there that could use some tutorials....

Above all, enjoy. The reason I'm still working on this website years after it's creation is for you.

- Ber'Zophus

Disclaimer:

All code provided on this page is for learning purposes only. Code is generally written to be optimized even for real-life applications, though some concepts described just shouldn't be used for anything but learning DirectX. It's strictly provided as-is without any warranty or guarantee of any sort, so don't expect it to work everywhere. If you come across a bug, send me an e-mail and I'll see if I can fix it out, but I can't provide guarantees.

All code is written completely under the GNU General Public License. Complete terms of the license can be found at The GNU GPL Home Page. In brief, you can use the code in your own personal use applications and modify it as you see fit. Just leave my name ("Ber'Zophus") in the code as an author. Free use is all good, but give credit where credit is due.

However, the websites on this webspace are a different matter. You are NOT permitted to copy materials on this website to any medium, unless: 1) You get the specific written consent of myself ("Ber'Zophus"), 2) You reference all materials in blocks, list my name ("Ber'Zophus") as the reference, and provide a link to my website. I spent too much work to just have my content ripped off by someone too lazy to write their own tutorials. If at any time you suspect someone has ripped off my page, please contact me immediately. It's very easy to tell who is a plagiarist. And, when concerning the Internet, it is no form of flattery. I'm sure you wouldn't like to spend a year of work on something to have some guy copy it all in 5 seconds.

And further more, if you don't understand ANYTHING on this site, anything at all, please ask me. I've tried very hard to explain everything so that anyone can learn DirectX. So hence, please e-mail me if you feel I've left something out. I'll update the page as soon as I can. You'll find my e-mail information under the 'About' menu at the top of this site.